Skip to content
This repository has been archived by the owner on Apr 8, 2022. It is now read-only.

Commit

Permalink
MDL-47610 gradebook: Show extra credit icon in grades column
Browse files Browse the repository at this point in the history
  • Loading branch information
zbdd committed Dec 16, 2014
1 parent 8f06fff commit 3712ee3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions grade/edit/tree/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -427,11 +427,6 @@ static function get_weight_input($item) {
);

$str .= $checkboxlbl . $checkbox . $hiddenlabel . $input;

if ($item->aggregationcoef > 0) {
$str .= ' ' . html_writer::tag('abbr', get_string('aggregationcoefextrasumabbr', 'grades'),
array('title' => get_string('aggregationcoefextrasum', 'grades')));
}
}

return $str;
Expand Down Expand Up @@ -771,6 +766,11 @@ public function get_item_cell($item, $params) {
$grademax = format_float($item->grademax, $item->get_decimals());
}

if ($item->aggregationcoef > 0 && $parent_cat->is_extracredit_used()) {
$grademax .= ' ' . html_writer::tag('abbr', get_string('aggregationcoefextrasumabbr', 'grades'),
array('title' => get_string('aggregationcoefextrasum', 'grades')));
}

$itemcell = parent::get_item_cell($item, $params);
$itemcell->text = $grademax;
return $itemcell;
Expand Down

0 comments on commit 3712ee3

Please sign in to comment.