From 12ea5b4b007f32ece160643950d14955b32df65a Mon Sep 17 00:00:00 2001 From: Tim Hunt Date: Tue, 13 Aug 2013 14:28:09 +0100 Subject: [PATCH] MDL-38765 quiz view: fix duplicate message. The "No more attempts are allowed" message was being shown twice. I checked back, and it has been like that since before the quiz was converted to use a renderer. Still, it looks horrible, so changing it. --- mod/quiz/renderer.php | 12 ++---------- mod/quiz/upgrade.txt | 6 ++++++ 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/mod/quiz/renderer.php b/mod/quiz/renderer.php index 4d7cc9b8a85..be9d92f642e 100644 --- a/mod/quiz/renderer.php +++ b/mod/quiz/renderer.php @@ -690,7 +690,6 @@ class mod_quiz_renderer extends plugin_renderer_base { $output = ''; $output .= $this->view_information($quiz, $cm, $context, $viewobj->infomessages); $output .= $this->view_table($quiz, $context, $viewobj); - $output .= $this->view_best_score($viewobj); $output .= $this->view_result_info($quiz, $context, $cm, $viewobj); $output .= $this->box($this->view_page_buttons($viewobj), 'quizattempt'); return $output; @@ -1031,17 +1030,10 @@ class mod_quiz_renderer extends plugin_renderer_base { } /** - * Prints the students best score - * - * @param mod_quiz_view_object $viewobj + * @deprecated Do not use any more. Removed in Moodle 2.5. */ public function view_best_score($viewobj) { - $output = ''; - // Print information about the student's best score for this quiz if possible. - if (!$viewobj->moreattempts) { - $output .= $this->heading(get_string('nomoreattempts', 'quiz')); - } - return $output; + return ''; } /** diff --git a/mod/quiz/upgrade.txt b/mod/quiz/upgrade.txt index cd73830b338..388bf3c66e6 100644 --- a/mod/quiz/upgrade.txt +++ b/mod/quiz/upgrade.txt @@ -1,6 +1,12 @@ This files describes API changes in the quiz code. +=== 2.4.5, 2.5.1 === + +* mod_quiz_renderer::view_best_score should not be used any more. (It did not do + what the name suggested anyway.) + + === 2.4 === * mod_quiz_renderer::finish_review_link now requires $attemptobj to be passed in