Skip to content

Commit

Permalink
CTP-3094 Restore the sequence number as a separate column
Browse files Browse the repository at this point in the history
CTP-3095 Remove percentage string in assessment component name and add percentage to weight number
  • Loading branch information
aydevworks committed Feb 8, 2024
1 parent 40c2b7e commit 993bc87
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions classes/output/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,9 @@ public function render_dashboard(array $moduledeliveries, int $courseid) : strin
if (!empty($moduledelivery->componentgrades) && is_array($moduledelivery->componentgrades)) {
$componentgrades = array_values($moduledelivery->componentgrades);
foreach ($componentgrades as $componentgrade) {
// Remove percentage from mab name.
$componentgrade->mabname = preg_replace('/\s*\(\d+%?\)$/', '', $componentgrade->mabname);

// Add the select source url.
$selectsourceurl = new \moodle_url(
'/local/sitsgradepush/select_source.php',
Expand Down
1 change: 1 addition & 0 deletions lang/en/local_sitsgradepush.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
$string['dashboard:seq'] = 'SEQ';
$string['dashboard:sits_assessment'] = 'SITS assessment';
$string['dashboard:weight'] = 'Weight';
$string['dashboard:mab_perc'] = '{$a}%';
$string['dashboard:asttype'] = 'AST TYPE';
$string['dashboard:source'] = 'Source';
$string['dashboard:moodle_activity'] = 'Moodle activity';
Expand Down
9 changes: 4 additions & 5 deletions templates/dashboard.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@
<table class="module-delivery-table table table-bordered mb-5">
<thead class="thead-light">
<tr class="small">
<th>{{#str}} dashboard:seq, local_sitsgradepush {{/str}}</th>
<th>{{#str}} dashboard:sits_assessment, local_sitsgradepush {{/str}}</th>
<th>{{#str}} dashboard:weight, local_sitsgradepush {{/str}}</th>
<th>{{#str}} dashboard:moodle_activity, local_sitsgradepush {{/str}}</th>
Expand All @@ -138,11 +139,9 @@
<tbody>
{{#componentgrades}}
<tr>
<th scope="row">
<span class="badge badge-dark">{{mabseq}}</span>
{{mabname}}
</th>
<td>{{mabperc}}</td>
<td>{{mabseq}}</td>
<td>{{mabname}}</td>
<td>{{#str}} dashboard:mab_perc, local_sitsgradepush, {{mabperc}} {{/str}}</td>
<td>
{{#assessmentmapping}}
<p>
Expand Down

0 comments on commit 993bc87

Please sign in to comment.