Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change message to show if quiz has no questions #19

Merged
merged 1 commit into from
Nov 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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