From 9bee6187e4e132c7cf4bbcb0a9ec7cfe822c3ded Mon Sep 17 00:00:00 2001 From: tjhunt Date: Fri, 14 Sep 2007 09:42:40 +0000 Subject: [PATCH] MDL-11271 - The closing bracket "}" can't be used in cloze question type. Now, you can excape a closing } with a backslash. Do feedback, as well as answer. --- question/type/multianswer/questiontype.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/question/type/multianswer/questiontype.php b/question/type/multianswer/questiontype.php index 94288f1f6d4..aba465d8c73 100644 --- a/question/type/multianswer/questiontype.php +++ b/question/type/multianswer/questiontype.php @@ -695,7 +695,8 @@ function qtype_multianswer_extract_question($text) { $wrapped->fraction[] = '0'; } if (isset($altregs[ANSWER_ALTERNATIVE_REGEX_FEEDBACK])) { - $wrapped->feedback[] = html_entity_decode($altregs[ANSWER_ALTERNATIVE_REGEX_FEEDBACK], ENT_QUOTES, 'UTF-8'); + $feedback = html_entity_decode($altregs[ANSWER_ALTERNATIVE_REGEX_FEEDBACK], ENT_QUOTES, 'UTF-8'); + $wrapped->feedback[] = str_replace('\}', '}', $feedback); } else { $wrapped->feedback[] = ''; }