diff --git a/mod/quiz/index.php b/mod/quiz/index.php index 640bddaf3a9ce..e73b7301e5d05 100644 --- a/mod/quiz/index.php +++ b/mod/quiz/index.php @@ -46,8 +46,10 @@ $PAGE->navbar->add($strquizzes); $PAGE->set_title($strquizzes); $PAGE->set_heading($course->fullname); -echo $OUTPUT->header(); -echo $OUTPUT->heading($strquizzes, 2); +/** @var renderer $output */ +$output = $PAGE->get_renderer('mod_quiz'); +echo $output->header(); +echo $output->heading($strquizzes, 2); // Get all the appropriate data. if (!$quizzes = get_all_instances_in_course("quiz", $course)) { @@ -162,8 +164,8 @@ $feedback = ''; if ($quiz->grade && array_key_exists($quiz->id, $grades)) { if ($alloptions->marks >= question_display_options::MARK_AND_MAX) { - $grade = $OUTPUT->render(new grade_out_of( - $grades[$quiz->id], $quiz->grade, $quiz->sumgrades, style: grade_out_of::SHORT)); + $grade = $output->render(new grade_out_of( + $quiz, $grades[$quiz->id], $quiz->grade, $quiz->sumgrades, style: grade_out_of::SHORT)); } if ($alloptions->overallfeedback) { $feedback = quiz_feedback_for_grade($grades[$quiz->id], $quiz, $context); @@ -182,4 +184,4 @@ echo html_writer::table($table); // Finish the page. -echo $OUTPUT->footer(); +echo $output->footer();