Skip to content

Commit

Permalink
Merge branch 'mdl-50957' of git://github.com/cdsmith-umn/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
David Monllao committed Aug 25, 2015
2 parents bcf9c54 + 368c1bb commit 61e44f4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion grade/report/user/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,12 @@ public function fill_contributions_column($element) {
if ($gradecat->aggregation == GRADE_AGGREGATE_SUM) {
// Natural aggregation/Sum of grades does not consider the mingrade, cannot traditionnally normalise it.
$graderange = $this->aggregationhints[$itemid]['grademax'];
$gradeval = $this->aggregationhints[$itemid]['grade'] / $graderange;

if ($graderange != 0) {
$gradeval = $this->aggregationhints[$itemid]['grade'] / $graderange;
} else {
$gradeval = 0;
}
} else {
$gradeval = grade_grade::standardise_score($this->aggregationhints[$itemid]['grade'],
$this->aggregationhints[$itemid]['grademin'], $this->aggregationhints[$itemid]['grademax'], 0, 1);
Expand Down

0 comments on commit 61e44f4

Please sign in to comment.