Skip to content

Commit

Permalink
v5.22.01
Browse files Browse the repository at this point in the history
  • Loading branch information
Ross Parker committed Jun 30, 2023
1 parent 82ce025 commit 93b47e8
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 8 deletions.
5 changes: 5 additions & 0 deletions Free Learning/CHANGEDB.php
Original file line number Diff line number Diff line change
Expand Up @@ -2235,3 +2235,8 @@
$sql[$count][0] = '5.22.00';
$sql[$count][1] = "
INSERT INTO `gibbonSetting` (`gibbonSettingID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`) VALUES (NULL , 'Free Learning', 'unitHistoryChart', 'Unit History Chart', 'Which chart type should be used in the Unit History table?', 'Doughnut');end";

//v5.22.01
++$count;
$sql[$count][0] = '5.22.01';
$sql[$count][1] = "";
4 changes: 4 additions & 0 deletions Free Learning/CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
CHANGELOG
=========
v5.22.01
--------
Restricted parent and student dashboard hooks to current year's data

v5.22.00
--------
Added Unit History chart option
Expand Down
2 changes: 1 addition & 1 deletion Free Learning/hook_parentalDashboard_unitHistory.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@

$page->scripts->add('chart');
$page->stylesheets->add('module-freeLearning', 'modules/Free Learning/css/module.css');
$returnInt .= $container->get(UnitHistory::class)->create($gibbonPersonID, true, $canBrowse, $disableParentEvidence);
$returnInt .= $container->get(UnitHistory::class)->create($gibbonPersonID, true, $canBrowse, $disableParentEvidence, $session->get('gibbonSchoolYearID'));
}

return $returnInt;
4 changes: 3 additions & 1 deletion Free Learning/hook_studentDashboard_unitHistory.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
$returnInt .= __('You do not have access to this action.');
$returnInt .= '</div>';
} else {
$canBrowse = isActionAccessible($guid, $connection2, '/modules/Free Learning/units_browse.php');

$returnInt .= "<p class='text-right mb-4 text-xs'>";
$returnInt .= sprintf(__m('%1$sView Showcase of Student Work%2$s'), "<a class='button' href='".$session->get('absoluteURL')."/index.php?q=/modules/Free Learning/showcase.php'>", '</a>');
$returnInt .= sprintf(__m('%1$sBrowse Units%2$s'), "<a class='button ml-2' href='".$session->get('absoluteURL')."/index.php?q=/modules/Free Learning/units_browse.php'>", '</a>');
Expand All @@ -48,7 +50,7 @@

$page->scripts->add('chart');
$page->stylesheets->add('module-freeLearning', 'modules/Free Learning/css/module.css');
$returnInt .= $container->get(UnitHistory::class)->create($gibbonPersonID, true);
$returnInt .= $container->get(UnitHistory::class)->create($gibbonPersonID, true, $canBrowse, false, $session->get('gibbonSchoolYearID'));
}

return $returnInt;
2 changes: 1 addition & 1 deletion Free Learning/manifest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
$entryURL = 'units_browse.php';
$type = 'Additional';
$category = 'Learn';
$version = '5.22.00';
$version = '5.22.01';
$author = 'Ross Parker';
$url = 'http://rossparker.org/free-learning';

Expand Down
4 changes: 0 additions & 4 deletions Free Learning/src/Tables/UnitHistory.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@ public function create($gibbonPersonID, $summary = false, $canBrowse = true, $di
->sortBy(['freeLearningUnitStudent.status', 'freeLearningUnit.name'])
->fromPOST('unitHistory');

if ($summary) {
$criteria->pageSize(8);
}

$units = $this->unitStudentGateway->queryUnitsByStudent($criteria, $gibbonPersonID, $gibbonSchoolYearID, $dateStart, $dateEnd);
$flCourses = $this->unitStudentGateway->selectCoursesByStudent($gibbonPersonID, $gibbonSchoolYearID)->fetchGroupedUnique();

Expand Down
2 changes: 1 addition & 1 deletion Free Learning/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@
/**
* Sets version information.
*/
$moduleVersion = '5.22.00';
$moduleVersion = '5.22.01';
$coreVersion = '24.0.00';

0 comments on commit 93b47e8

Please sign in to comment.