Skip to content

Commit

Permalink
Merge pull request #19 from PhilippImhof/no-questions
Browse files Browse the repository at this point in the history
Change message to show if quiz has no questions
  • Loading branch information
lucaboesch authored Nov 11, 2023
2 parents 50f49ed + 1a35f07 commit 8fbcf90
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion report.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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();
}
Expand Down

0 comments on commit 8fbcf90

Please sign in to comment.