diff --git a/main/gradebook/lib/scoredisplay.class.php b/main/gradebook/lib/scoredisplay.class.php index d31a47f4b6..5ca85d27ba 100644 --- a/main/gradebook/lib/scoredisplay.class.php +++ b/main/gradebook/lib/scoredisplay.class.php @@ -426,7 +426,11 @@ class ScoreDisplay $converted2 = array(); foreach ($converted as $element) { $newelement = array(); - $newelement['score'] = $element['score'] / $highest; + if (!empty($highest)) { + $newelement['score'] = $element['score'] / $highest; + } else { + $newelement['score'] = 0; + } $newelement['display'] = $element['display']; $converted2[] = $newelement; }