-
Bug
-
Resolution: Fixed
-
Minor
-
2.5
-
MOODLE_25_STABLE
-
MOODLE_24_STABLE, MOODLE_25_STABLE
-
In mod/quiz/renderer.php starting at around line 1086, there is this code:
if ($viewobj->feedbackcolumn) {
|
$resultinfo .= $this->heading(get_string('overallfeedback', 'quiz'), 3, 'main');
|
$resultinfo .= html_writer::tag('p',
|
quiz_feedback_for_grade($viewobj->mygrade, $quiz, $context), array('class' => 'quizgradefeedback'))."\n";
|
}
|
which generates the feedback for the actual quiz. In my case, the feedback entered by the teacher is something like <p>foo bar barfu</p>, whilst the text itself doesn't matter, it's the surrounding <p>-tags, generated by TinyMCE. The code above with the entered feedback populates to the following HTML:
<div id="feedback" class="box generalbox">
|
<h2 class="main">Bester Versuch: 5,00 / 10,00.</h2>
|
<h3 class="main">Gesamt-Feedback</h3>
|
<p class="quizgradefeedback"></p>
|
<p>Sie haben das Modul abgeschlossen.</p>
|
<p></p>
|
</div>
|
As one can see, the feedback isn't in the right spot, which should be the paragraph with the class I suppose. I didn't dig deeper in the html_writer class, but I'm guessing it's not nesting the paragraphs, hence the "wrong" HTML code above. I suggest changing the shown php code from html_writer::tag('p' to html_writer::tag('div' as it behaves as expected.