Skip to content

Commit

Permalink
v5.25.01
Browse files Browse the repository at this point in the history
  • Loading branch information
Ross Parker committed Dec 2, 2024
1 parent 056aec5 commit 2f1019b
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 16 deletions.
5 changes: 5 additions & 0 deletions Free Learning/CHANGEDB.php
Original file line number Diff line number Diff line change
Expand Up @@ -2329,4 +2329,9 @@
//v5.25.00
++$count;
$sql[$count][0] = '5.25.00';
$sql[$count][1] = "";

//v5.25.01
++$count;
$sql[$count][0] = '5.25.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
=========
v2.25.01
-------
Added new pink label colour for student units with status Exempt

v2.25.00
-------
Added (v28 dependent) ability for teachers to edit their own comments within 48 hours
Expand Down
6 changes: 6 additions & 0 deletions Free Learning/css/module.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
color: #B3801B;
}

.exempt {
border-color: #e520b7;
background-color: #f9dbf2;
color: #e520b7;
}

.vis-tooltip {
margin-top: 4.5rem;
margin-left: 0.5rem;
Expand Down
2 changes: 1 addition & 1 deletion Free Learning/manifest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
$entryURL = 'units_browse.php';
$type = 'Additional';
$category = 'Learn';
$version = '5.25.00';
$version = '5.25.01';
$author = "Gibbon Foundation";
$url = "https://gibbonedu.org";

Expand Down
8 changes: 4 additions & 4 deletions Free Learning/report_mentorshipOverview.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,11 +180,11 @@
'position' => 'right',
]
])
->setLabels([__m('Current - Pending'), __m('Current'), __m('Complete - Pending'), __m('Evidence Not Yet Approved'), __m('Complete - Approved')])
->setColors(['#FAF089', '#BAE6FD', '#DCC5f4', '#FFD2A8', '#6EE7B7']);
->setLabels([__m('Current - Pending'), __m('Current'), __m('Complete - Pending'), __m('Evidence Not Yet Approved'), __m('Complete - Approved'), __m('Exempt')])
->setColors(['#FAF089', '#BAE6FD', '#DCC5f4', '#FFD2A8', '#6EE7B7', '#f9dbf2']);

$chart->addDataset('pie')
->setData([$unitStats['Current - Pending'], $unitStats['Current'], $unitStats['Complete - Pending'], $unitStats['Evidence Not Yet Approved'], $unitStats['Complete - Approved']]);
->setData([$unitStats['Current - Pending'], $unitStats['Current'], $unitStats['Complete - Pending'], $unitStats['Evidence Not Yet Approved'], $unitStats['Complete - Approved'], $unitStats['Exempt']]);

echo $chart->render();

Expand All @@ -204,7 +204,7 @@
if ($student['status'] == 'Evidence Not Yet Approved') $row->addClass('warning');
if ($student['status'] == 'Complete - Pending') $row->addClass('pending');
if ($student['status'] == 'Complete - Approved') $row->addClass('success');
if ($student['status'] == 'Exempt') $row->addClass('success');
if ($student['status'] == 'Exempt') $row->addClass('exempt');
return $row;
});

Expand Down
2 changes: 1 addition & 1 deletion Free Learning/report_studentProgressByClass.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@

$table->addColumn('exemptCount', __('Exempt'))
->width('11%')
->addClass('success');
->addClass('exempt');

$table->addColumn('totalCount', __('Total'))
->width('11%');
Expand Down
12 changes: 6 additions & 6 deletions Free Learning/src/Tables/UnitHistory.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public function create($gibbonPersonID, $summary = false, $canBrowse = true, $di
"Current" => [],
"Current - Pending" => [],
"Incomplete" => [],
"Exempt" => [],
];

$statuses = array_keys($unitStats);
Expand All @@ -89,8 +90,6 @@ public function create($gibbonPersonID, $summary = false, $canBrowse = true, $di
foreach ($units as $unit) {
if ($unit['status'] != $status) continue;

if ($unit['status'] == 'Exempt') $unit['status'] = 'Complete - Approved';

if ($unit['flCourse'] == $course['name']) {
$unitStats[$unit['status']][$index]++;
$unitTotal++;
Expand Down Expand Up @@ -140,11 +139,11 @@ public function create($gibbonPersonID, $summary = false, $canBrowse = true, $di
'position' => 'right',
]
])
->setLabels([__m('Current - Pending'), __m('Current'), __m('Complete - Pending'), __m('Evidence Not Yet Approved'), __m('Complete - Approved')])
->setColors(['#FAF089', '#BAE6FD', '#DCC5f4', '#FFD2A8', '#6EE7B7']);
->setLabels([__m('Current - Pending'), __m('Current'), __m('Complete - Pending'), __m('Evidence Not Yet Approved'), __m('Complete - Approved'), __m('Exempt')])
->setColors(['#FAF089', '#BAE6FD', '#DCC5f4', '#FFD2A8', '#6EE7B7', '#f9dbf2']);

$chart->addDataset('pie')
->setData([$unitStats['Current - Pending'], $unitStats['Current'], $unitStats['Complete - Pending'], $unitStats['Evidence Not Yet Approved'], $unitStats['Complete - Approved']]);
->setData([$unitStats['Current - Pending'], $unitStats['Current'], $unitStats['Complete - Pending'], $unitStats['Evidence Not Yet Approved'], $unitStats['Complete - Approved'], $unitStats['Exempt']]);
}

$output .= $chart->render();
Expand All @@ -158,7 +157,7 @@ public function create($gibbonPersonID, $summary = false, $canBrowse = true, $di
if ($student['status'] == 'Evidence Not Yet Approved') $row->setClass('warning');
if ($student['status'] == 'Complete - Pending') $row->setClass('pending');
if ($student['status'] == 'Complete - Approved') $row->setClass('success');
if ($student['status'] == 'Exempt') $row->setClass('success');
if ($student['status'] == 'Exempt') $row->setClass('exempt');
return $row;
});

Expand All @@ -168,6 +167,7 @@ public function create($gibbonPersonID, $summary = false, $canBrowse = true, $di
'status:complete - pending' => __('Status') .': '.__m('Complete - Pending'),
'status:evidence not yet approved' => __('Status') .': '.__m('Evidence Not Yet Approved'),
'status:complete - approved' => __('Status') .': '.__m('Complete - Approved'),
'status:exempt' => __('Status') .': '.__m('Exempt'),
];

$learningAreas = $this->unitStudentGateway->selectLearningAreasByStudent($gibbonPersonID)->fetchKeyPair();
Expand Down
1 change: 1 addition & 0 deletions Free Learning/templates/unitLegend.twig.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@
<span class="tag pending mr-2">{{ __m('Complete - Pending') }}</span>
<span class="tag warning mr-2">{{ __m('Evidence Not Yet Approved') }}</span>
<span class="tag success mr-2">{{ __m('Complete - Approved') }}</span>
<span class="tag exempt mr-2">{{ __m('Exempt') }}</span>
</div>
4 changes: 2 additions & 2 deletions Free Learning/units_browse.php
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@
switch ($unit['status']) {
case 'Complete - Approved':
case 'Exempt':
$unit['statusClass'] = 'success';
$unit['statusClass'] = 'exempt';
break;
case 'Current':
$unit['statusClass'] = 'currentUnit';
Expand Down Expand Up @@ -499,7 +499,7 @@
}

if ($unit['status'] == 'Complete - Approved' or $unit['status'] == 'Exempt') {
$nodeList .= '{id: '.$countNodes.", shape: 'circularImage', image: 'undefined', label: '".addSlashes($unit['name'])."', title: '".$title."', color: {border:'#390', background:'#D4F6DC'}, borderWidth: 2},";
$nodeList .= '{id: '.$countNodes.", shape: 'circularImage', image: 'undefined', label: '".addSlashes($unit['name'])."', title: '".$title."', color: {border:'#e520b7', background:'#f9dbf2'}, borderWidth: 2},";
} elseif ($unit['status'] == 'Current') {
$nodeList .= '{id: '.$countNodes.", shape: 'circularImage', image: 'undefined', label: '".addSlashes($unit['name'])."', title: '".$title."', color: {border:'#0EA5E9', background:'#BAE6FD'}, borderWidth: 2},";
} elseif ($unit['status'] == 'Current - Pending') {
Expand Down
2 changes: 1 addition & 1 deletion Free Learning/units_browse_details.php
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@
if ($student['status'] == 'Evidence Not Yet Approved') $row->addClass('warning');
if ($student['status'] == 'Complete - Pending') $row->addClass('pending');
if ($student['status'] == 'Complete - Approved') $row->addClass('success');
if ($student['status'] == 'Exempt') $row->addClass('success');
if ($student['status'] == 'Exempt') $row->addClass('exempt');
return $row;
});

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

0 comments on commit 2f1019b

Please sign in to comment.