Fixing Division by zero error

skala
Julio Montoya 13 years ago
parent b3f8d759ba
commit e703384670
  1. 4
      main/gradebook/lib/scoredisplay.class.php

@ -426,7 +426,11 @@ class ScoreDisplay
$converted2 = array();
foreach ($converted as $element) {
$newelement = array();
if (!empty($highest)) {
$newelement['score'] = $element['score'] / $highest;
} else {
$newelement['score'] = 0;
}
$newelement['display'] = $element['display'];
$converted2[] = $newelement;
}

Loading…
Cancel
Save