From 97ba2d707c7413bc0625ddf61b480bc6d82e8fa9 Mon Sep 17 00:00:00 2001 From: Rajneel Totaram Date: Tue, 20 Apr 2021 20:12:05 +1200 Subject: [PATCH] MDL-71376 mod_quiz: fix undefined object reference --- mod/quiz/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mod/quiz/index.php b/mod/quiz/index.php index f15c30304e7..6c87002f62c 100644 --- a/mod/quiz/index.php +++ b/mod/quiz/index.php @@ -125,8 +125,8 @@ foreach ($quizzes as $quiz) { $strsection = $quiz->section; $strsection = get_section_name($course, $quiz->section); } - if ($currentsection) { - $learningtable->data[] = 'hr'; + if ($currentsection !== "") { + $table->data[] = 'hr'; } $currentsection = $quiz->section; }