diff --git a/classes/output/renderer.php b/classes/output/renderer.php index b232f9dd0c..e83400a49a 100644 --- a/classes/output/renderer.php +++ b/classes/output/renderer.php @@ -1740,7 +1740,7 @@ private function construct_user_allsessions_log(user_data $userdata) { } $row = new html_table_row(); - if ($maxpoints !== 0) { + if (!empty($maxpoints)) { $pctodate = format_float( $points * 100 / $maxpoints); $pointsinfo = get_string('points', 'attendance') . ": " . $points . "/" . $maxpoints; $pointsinfo .= " (" . $pctodate . "%)"; @@ -1827,7 +1827,7 @@ private function construct_user_allsessions_log(user_data $userdata) { $row->cells[] = $cell; $points = $stats['course'][$sess->courseid]['points']; $maxpoints = $stats['course'][$sess->courseid]['maxpointstodate']; - if ($maxpoints !== 0) { + if (!empty($maxpoints)) { $pctodate = format_float( $points * 100 / $maxpoints); $summary = get_string('points', 'attendance') . ": " . $points . "/" . $maxpoints; $summary .= " (" . $pctodate . "%)";