diff --git a/ATL/CHANGEDB.php b/ATL/CHANGEDB.php
index ae21524..c229fc6 100644
--- a/ATL/CHANGEDB.php
+++ b/ATL/CHANGEDB.php
@@ -176,3 +176,8 @@
++$count;
$sql[$count][0] = '1.5.09';
$sql[$count][1] = '';
+
+//v1.5.10
+++$count;
+$sql[$count][0] = '1.5.10';
+$sql[$count][1] = '';
diff --git a/ATL/CHANGELOG.txt b/ATL/CHANGELOG.txt
index 6b882e1..c598227 100644
--- a/ATL/CHANGELOG.txt
+++ b/ATL/CHANGELOG.txt
@@ -1,5 +1,10 @@
CHANGELOG
=========
+v1.5.10
+-------
+Fixed visualization showing data that has not gone live
+Added a Go Live date reminder to the Write ATL page
+
v1.5.09
-------
Fixed student and parent PHP dashboard warning and exception
diff --git a/ATL/atl_write_data.php b/ATL/atl_write_data.php
index 4513ba5..bdd3ada 100644
--- a/ATL/atl_write_data.php
+++ b/ATL/atl_write_data.php
@@ -118,7 +118,7 @@
$form->addRow()->addHeading(__('Students'));
$form->addRow()->addAlert(__('There are no records to display.'), 'error');
} else {
- $table = $form->addRow()->addTable()->setClass('smallIntBorder fullWidth colorOddEven noMargin noPadding noBorder');
+ $table = $form->addRow()->setClass('p-0')->addTable()->setClass('smallIntBorder fullWidth colorOddEven noMargin noPadding noBorder');
$completeText = !empty($values['completeDate'])? __('Marked on').' '.Format::date($values['completeDate']) : __('Unmarked');
@@ -170,6 +170,10 @@
$row->addLabel('completeDate', __('Go Live Date'))->prepend('1. ')->append('
'.__('2. Column is hidden until date is reached.'));
$row->addDate('completeDate');
+ if (!empty($values['completeDate']) && $values['completeDate'] > date('Y-m-d', strtotime('+1 day'))) {
+ $row = $form->addRow()->addAlert(__m('Your Go Live date is more than 24 hours in the future. If you have completed this ATL, be sure to update your Go Live date to set it to the next school day.'), 'message');
+ }
+
$row = $form->addRow();
$row->addSubmit();
diff --git a/ATL/manifest.php b/ATL/manifest.php
index 5262737..bbb672d 100644
--- a/ATL/manifest.php
+++ b/ATL/manifest.php
@@ -25,7 +25,7 @@
$entryURL = 'atl_write.php';
$type = 'Additional';
$category = 'Assess';
-$version = '1.5.09';
+$version = '1.5.10';
$author = 'Ross Parker';
$url = 'http://rossparker.org';
diff --git a/ATL/moduleFunctions.php b/ATL/moduleFunctions.php
index d055b2b..d1efe9f 100644
--- a/ATL/moduleFunctions.php
+++ b/ATL/moduleFunctions.php
@@ -27,7 +27,11 @@
use Gibbon\Contracts\Services\Session;
function getATLRecord($guid, $connection2, $gibbonPersonID) {
- global $session;
+ global $session, $container;
+
+ require_once $session->get('absolutePath').'/modules/ATL/src/Domain/ATLColumnGateway.php';
+
+ $atlColumnGateway = $container->get(ATLColumnGateway::class);
$output = '';
@@ -49,16 +53,9 @@ function getATLRecord($guid, $connection2, $gibbonPersonID) {
$results = false;
while ($rowYears = $resultYears->fetch()) {
//Get and output ATLs
- try {
- $dataATL = array('gibbonPersonID1' => $gibbonPersonID, 'gibbonPersonID2' => $gibbonPersonID, 'gibbonSchoolYearID' => $rowYears['gibbonSchoolYearID']);
- $sqlATL = "SELECT DISTINCT atlColumn.*, atlEntry.*, gibbonCourse.name AS course, gibbonCourseClass.nameShort AS class, gibbonPerson.dateStart FROM gibbonCourse JOIN gibbonCourseClass ON (gibbonCourseClass.gibbonCourseID=gibbonCourse.gibbonCourseID) JOIN gibbonCourseClassPerson ON (gibbonCourseClassPerson.gibbonCourseClassID=gibbonCourseClass.gibbonCourseClassID) JOIN atlColumn ON (atlColumn.gibbonCourseClassID=gibbonCourseClass.gibbonCourseClassID) JOIN atlEntry ON (atlEntry.atlColumnID=atlColumn.atlColumnID) JOIN gibbonPerson ON (atlEntry.gibbonPersonIDStudent=gibbonPerson.gibbonPersonID) WHERE gibbonCourseClassPerson.gibbonPersonID=:gibbonPersonID1 AND atlEntry.gibbonPersonIDStudent=:gibbonPersonID2 AND gibbonSchoolYearID=:gibbonSchoolYearID AND completeDate<='".date('Y-m-d')."' AND gibbonCourseClass.reportable='Y' AND gibbonCourseClassPerson.reportable='Y' ORDER BY completeDate DESC, gibbonCourse.nameShort, gibbonCourseClass.nameShort";
- $resultATL = $connection2->prepare($sqlATL);
- $resultATL->execute($dataATL);
- } catch (PDOException $e) {
- $output .= "