From ef467ee957e1f8c429759a668e6feef59a93fd17 Mon Sep 17 00:00:00 2001 From: Marina Glancy Date: Fri, 15 Aug 2014 15:53:10 +0800 Subject: [PATCH] MDL-46691 mod_choice: apply filters to user input --- mod/choice/lib.php | 2 +- mod/choice/view.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mod/choice/lib.php b/mod/choice/lib.php index 29935ee7da7..c51c8074b63 100644 --- a/mod/choice/lib.php +++ b/mod/choice/lib.php @@ -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; diff --git a/mod/choice/view.php b/mod/choice/view.php index 55e1086de0c..406fd7f7c3c 100644 --- a/mod/choice/view.php +++ b/mod/choice/view.php @@ -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); }