|
@@ -46,6 +46,7 @@ class Test extends Model {
|
|
|
|
|
|
|
|
$tester = $this->getTester();
|
|
$tester = $this->getTester();
|
|
|
$location = $this->getLocation();
|
|
$location = $this->getLocation();
|
|
|
|
|
+ $project = $this->getProject();
|
|
|
|
|
|
|
|
// Content
|
|
// Content
|
|
|
$name = htmlspecialchars($tester->first_name);
|
|
$name = htmlspecialchars($tester->first_name);
|
|
@@ -60,9 +61,15 @@ class Test extends Model {
|
|
|
$builder = new EmailBuilder;
|
|
$builder = new EmailBuilder;
|
|
|
$builder->addParagraph("<b>Hi $name,</b>");
|
|
$builder->addParagraph("<b>Hi $name,</b>");
|
|
|
$builder->addLeadParagraph("Congrats, you have been allocated a test!");
|
|
$builder->addLeadParagraph("Congrats, you have been allocated a test!");
|
|
|
|
|
+
|
|
|
|
|
+ if($project->isNighttime()) {
|
|
|
|
|
+ $builder->addParagraph("<b><font color=\"red\">Evening Test to be done between 7PM and midnight.</font></b>");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
if($message) {
|
|
if($message) {
|
|
|
$builder->addParagraph($message);
|
|
$builder->addParagraph($message);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
$builder->addParagraph("We need you to confirm if you are able to do the test. Please check the details below and then confirm by pressing the <b>Accept</b> or <b>Decline</b> buttons and once you tap <b>Accept</b>, the test will be allocated to you.");
|
|
$builder->addParagraph("We need you to confirm if you are able to do the test. Please check the details below and then confirm by pressing the <b>Accept</b> or <b>Decline</b> buttons and once you tap <b>Accept</b>, the test will be allocated to you.");
|
|
|
$builder->addAcceptDeclineButtons($base_url);
|
|
$builder->addAcceptDeclineButtons($base_url);
|
|
|
$builder->addParagraph("The site address is: <b>$address</b>");
|
|
$builder->addParagraph("The site address is: <b>$address</b>");
|
|
@@ -86,6 +93,7 @@ class Test extends Model {
|
|
|
|
|
|
|
|
$tester = $this->getTester();
|
|
$tester = $this->getTester();
|
|
|
$location = $this->getLocation();
|
|
$location = $this->getLocation();
|
|
|
|
|
+ $project = $this->getProject();
|
|
|
|
|
|
|
|
// Content
|
|
// Content
|
|
|
$name = htmlspecialchars($tester->first_name);
|
|
$name = htmlspecialchars($tester->first_name);
|
|
@@ -96,6 +104,11 @@ class Test extends Model {
|
|
|
$builder = new EmailBuilder;
|
|
$builder = new EmailBuilder;
|
|
|
$builder->addParagraph("<b>Hi $name,</b>");
|
|
$builder->addParagraph("<b>Hi $name,</b>");
|
|
|
$builder->addLeadParagraph("Congrats, you have claimed a test!");
|
|
$builder->addLeadParagraph("Congrats, you have claimed a test!");
|
|
|
|
|
+
|
|
|
|
|
+ if($project->isNighttime()) {
|
|
|
|
|
+ $builder->addParagraph("<b><font color=\"red\">Evening Test to be done between 7PM and midnight.</font></b>");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
$builder->addParagraph("The site address is: <b>$address</b>");
|
|
$builder->addParagraph("The site address is: <b>$address</b>");
|
|
|
$builder->addParagraph("The date that need to complete and submit the results by is: <font color=\"red\"><b>$date_due</b></font>");
|
|
$builder->addParagraph("The date that need to complete and submit the results by is: <font color=\"red\"><b>$date_due</b></font>");
|
|
|
$builder->addParagraph("For methodology and further notes please check the <b>Useful Documents</b> section on the <b>Account</b> page.");
|
|
$builder->addParagraph("For methodology and further notes please check the <b>Useful Documents</b> section on the <b>Account</b> page.");
|