Skip to content

Commit

Permalink
v1.4.03
Browse files Browse the repository at this point in the history
  • Loading branch information
rossdotparker committed Apr 12, 2019
1 parent 6c46976 commit 066bade
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 12 deletions.
4 changes: 4 additions & 0 deletions ATL/CHANGEDB.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,7 @@
$sql[$count][0] = '1.4.02';
$sql[$count][1] = '';

//v1.4.03
++$count;
$sql[$count][0] = '1.4.03';
$sql[$count][1] = '';
4 changes: 4 additions & 0 deletions ATL/CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
CHANGELOG
=========
v1.4.03
-------
Rubric fix

v1.4.02
-------
Fix a file-include related error in dashboard hooks
Expand Down
9 changes: 6 additions & 3 deletions ATL/atl_view.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
echo __('Your request failed because you do not have access to this action.');
echo '</div>';
} else {
// Register scripts available to the core, but not included by default
$page->scripts->add('chart', 'lib/Chart.js/2.0/Chart.bundle.min.js', ['context' => 'head']);

//Get action with highest precendence
$highestAction = getHighestGroupedAction($guid, $_GET['q'], $connection2);
if ($highestAction == false) {
Expand Down Expand Up @@ -137,16 +140,16 @@

$form = Form::create("filter", $_SESSION[$guid]['absoluteURL']."/index.php", "get", "noIntBorder fullWidth standardForm");
$form->setFactory(DatabaseFormFactory::create($pdo));

$form->addHiddenValue('q', '/modules/ATL/atl_view.php');

$row = $form->addRow();
$row->addLabel('gibbonPersonID', __('Child'))->description('Choose the child you are registering for.');
$row->addSelect('gibbonPersonID')->fromArray($options)->selected($gibbonPersonID);

$row = $form->addRow();
$row->addSearchSubmit($gibbon->session);

echo $form->getOutput();
}

Expand Down
3 changes: 3 additions & 0 deletions ATL/atl_write.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
echo __('Your request failed because you do not have access to this action.');
echo '</div>';
} else {
// Register scripts available to the core, but not included by default
$page->scripts->add('chart', 'lib/Chart.js/2.0/Chart.bundle.min.js', ['context' => 'head']);

//Get action with highest precendence
$highestAction = getHighestGroupedAction($guid, $_GET['q'], $connection2);
if ($highestAction == false) {
Expand Down
17 changes: 10 additions & 7 deletions ATL/atl_write_data.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
echo __('You do not have access to this action.');
echo '</div>';
} else {
// Register scripts available to the core, but not included by default
$page->scripts->add('chart', 'lib/Chart.js/2.0/Chart.bundle.min.js', ['context' => 'head']);

$highestAction = getHighestGroupedAction($guid, $_GET['q'], $connection2);
if ($highestAction == false) {
echo "<div class='error'>";
Expand Down Expand Up @@ -99,12 +102,12 @@

$data = array('gibbonCourseClassID' => $gibbonCourseClassID, 'atlColumnID' => $atlColumnID, 'today' => date('Y-m-d'));
$sql = "SELECT gibbonPerson.gibbonPersonID, gibbonPerson.title, gibbonPerson.surname, gibbonPerson.preferredName, gibbonPerson.dateStart, atlEntry.*
FROM gibbonCourseClassPerson
JOIN gibbonPerson ON (gibbonCourseClassPerson.gibbonPersonID=gibbonPerson.gibbonPersonID)
FROM gibbonCourseClassPerson
JOIN gibbonPerson ON (gibbonCourseClassPerson.gibbonPersonID=gibbonPerson.gibbonPersonID)
LEFT JOIN atlEntry ON (atlEntry.gibbonPersonIDStudent=gibbonPerson.gibbonPersonID AND atlEntry.atlColumnID=:atlColumnID)
WHERE gibbonCourseClassPerson.gibbonCourseClassID=:gibbonCourseClassID
AND gibbonCourseClassPerson.reportable='Y' AND gibbonCourseClassPerson.role='Student'
AND gibbonPerson.status='Full' AND (dateStart IS NULL OR dateStart<=:today) AND (dateEnd IS NULL OR dateEnd>=:today)
WHERE gibbonCourseClassPerson.gibbonCourseClassID=:gibbonCourseClassID
AND gibbonCourseClassPerson.reportable='Y' AND gibbonCourseClassPerson.role='Student'
AND gibbonPerson.status='Full' AND (dateStart IS NULL OR dateStart<=:today) AND (dateEnd IS NULL OR dateEnd>=:today)
ORDER BY gibbonPerson.surname, gibbonPerson.preferredName";
$result = $pdo->executeQuery($data, $sql);
$students = ($result->rowCount() > 0)? $result->fetchAll() : array();
Expand Down Expand Up @@ -159,7 +162,7 @@
->addParam('type', 'effort')
->addParam('width', '1100')
->addParam('height', '550');

$form->addHiddenValue($count.'-gibbonPersonID', $student['gibbonPersonID']);
}

Expand All @@ -175,7 +178,7 @@
$row->addSubmit();

$form->loadAllValuesFrom($values);

echo $form->getOutput();
}
}
Expand Down
2 changes: 1 addition & 1 deletion ATL/manifest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
$entryURL = 'atl_write.php';
$type = 'Additional';
$category = 'Assess';
$version = '1.4.02';
$version = '1.4.03';
$author = 'Ross Parker';
$url = 'http://rossparker.org';

Expand Down
2 changes: 1 addition & 1 deletion ATL/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
/**
* Sets version information.
*/
$moduleVersion = '1.4.02';
$moduleVersion = '1.4.03';

0 comments on commit 066bade

Please sign in to comment.