MDL-46691 mod_choice: apply filters to user input

This commit is contained in:
Marina Glancy 2014-08-15 15:53:10 +08:00
parent e1eb180806
commit ba9390784d
2 changed files with 3 additions and 3 deletions

View File

@ -207,7 +207,7 @@ function choice_prepare_options($choice, $user, $coursemodule, $allresponses) {
$option = new stdClass;
$option->attributes = new stdClass;
$option->attributes->value = $optionid;
$option->text = $text;
$option->text = format_string($text);
$option->maxanswers = $choice->maxanswers[$optionid];
$option->displaylayout = $choice->display;

View File

@ -69,11 +69,11 @@
choice_user_submit_response($answer, $choice, $USER->id, $course, $cm);
}
echo $OUTPUT->header();
echo $OUTPUT->heading($choice->name, 2, null);
echo $OUTPUT->heading(format_string($choice->name), 2, null);
echo $OUTPUT->notification(get_string('choicesaved', 'choice'),'notifysuccess');
} else {
echo $OUTPUT->header();
echo $OUTPUT->heading($choice->name, 2, null);
echo $OUTPUT->heading(format_string($choice->name), 2, null);
}