From 1a35f076fa7502ff7d51abe647d2be58bcb2bd9c Mon Sep 17 00:00:00 2001 From: Philipp Imhof <52650214+PhilippImhof@users.noreply.github.com> Date: Sat, 11 Nov 2023 13:28:15 +0100 Subject: [PATCH] message to show if no questions --- report.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/report.php b/report.php index 294f3aa..b99b4dd 100644 --- a/report.php +++ b/report.php @@ -79,6 +79,8 @@ class quiz_archive_report extends quiz_archive_report_parent_class_alias { * @throws moodle_exception */ public function display($quiz, $cm, $course) { + global $OUTPUT; + $this->init('archive', 'quiz_archive_settings_form', $quiz, $cm, $course); $this->options = new quiz_archive_options('archive', $quiz, $cm, $course); @@ -123,7 +125,7 @@ public function display($quiz, $cm, $course) { // What sort of page to display? if (!$hasquestions) { - echo quiz_no_questions_message($quiz, $cm, $this->context); + echo $OUTPUT->notification(get_string('noattemptstoshow', 'quiz')); } else { $this->display_archive(); }