diff --git a/classes/output/renderer.php b/classes/output/renderer.php index f15702aa92..994d6d732c 100644 --- a/classes/output/renderer.php +++ b/classes/output/renderer.php @@ -1742,7 +1742,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 . "%)"; @@ -1829,7 +1829,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 . "%)";