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.
This commit is contained in:
+2
-10
@@ -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 '';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user