mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 13:02:07 +02:00
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:
parent
838d78a9ff
commit
ad8f011755
@ -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;
|
||||
@ -1030,20 +1029,6 @@ class mod_quiz_renderer extends plugin_renderer_base {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Prints the students best score
|
||||
*
|
||||
* @param mod_quiz_view_object $viewobj
|
||||
*/
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates data pertaining to quiz results
|
||||
*
|
||||
|
@ -1,6 +1,12 @@
|
||||
This files describes API changes in the quiz code.
|
||||
|
||||
|
||||
=== 2.6 ===
|
||||
|
||||
* mod_quiz_renderer::view_best_score has been removed. (It did not do what the
|
||||
name suggested anyway.)
|
||||
|
||||
|
||||
=== 2.4 ===
|
||||
|
||||
* mod_quiz_renderer::finish_review_link now requires $attemptobj to be passed in
|
||||
|
Loading…
x
Reference in New Issue
Block a user