mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
MDL-10300 - cleaning incorrectly applied to overall feedback.
This commit is contained in:
parent
00719c02d6
commit
de266537a7
@ -346,7 +346,7 @@ function quiz_rescale_grade($rawgrade, $quiz) {
|
||||
|
||||
/**
|
||||
* Get the feedback text that should be show to a student who
|
||||
* got this grade on this quiz.
|
||||
* got this grade on this quiz. The feedback is processed ready for diplay.
|
||||
*
|
||||
* @param float $grade a grade on this quiz.
|
||||
* @param integer $quizid the id of the quiz object.
|
||||
@ -360,6 +360,11 @@ function quiz_feedback_for_grade($grade, $quizid) {
|
||||
$feedback = '';
|
||||
}
|
||||
|
||||
// Clean the text, ready for display.
|
||||
$formatoptions = new stdClass;
|
||||
$formatoptions->noclean = true;
|
||||
$feedback = format_text($feedback, FORMAT_MOODLE, $formatoptions);
|
||||
|
||||
return $feedback;
|
||||
}
|
||||
|
||||
|
@ -228,7 +228,7 @@ class mod_quiz_mod_form extends moodleform_mod {
|
||||
}
|
||||
$numfeedbacks = max(count($this->_feedbacks) * 1.5, 5);
|
||||
|
||||
$mform->setType('feedbacktext', PARAM_TEXT);
|
||||
$mform->setType('feedbacktext', PARAM_RAW);
|
||||
$mform->setType('feedbackboundaries', PARAM_NOTAGS);
|
||||
|
||||
$nextel=$this->repeat_elements($repeatarray, $numfeedbacks-1,
|
||||
|
@ -42,6 +42,10 @@ class quiz_report extends quiz_default_report {
|
||||
break;
|
||||
}
|
||||
|
||||
// Set of format options for teacher-created content, for example overall feedback.
|
||||
$nocleanformatoptions = new stdClass;
|
||||
$nocleanformatoptions->noclean = true;
|
||||
|
||||
// Set table options
|
||||
$noattempts = optional_param('noattempts', 0, PARAM_INT);
|
||||
$detailedmarks = optional_param('detailedmarks', 0, PARAM_INT);
|
||||
@ -466,7 +470,7 @@ class quiz_report extends quiz_default_report {
|
||||
}
|
||||
if ($hasfeedback) {
|
||||
if ($attempt->timefinish) {
|
||||
$row[] = $attempt->feedbacktext;
|
||||
$row[] = format_text($attempt->feedbacktext, FORMAT_MOODLE, $nocleanformatoptions);
|
||||
} else {
|
||||
$row[] = '-';
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user