From 83d22f706434663e1783b904ff0419a04ea51d8f Mon Sep 17 00:00:00 2001 From: tjhunt Date: Fri, 14 Sep 2007 09:42:53 +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. Merged from MOODLE_18_STABLE. --- 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 d66c6526f4..68f5400b21 100644 --- a/question/type/multianswer/questiontype.php +++ b/question/type/multianswer/questiontype.php @@ -700,7 +700,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[] = ''; } -- 2.39.5