From: tjhunt Date: Fri, 14 Sep 2007 09:42:53 +0000 (+0000) Subject: MDL-11271 - The closing bracket "}" can't be used in cloze question type. Now, you... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=83d22f706434663e1783b904ff0419a04ea51d8f;p=moodle.git 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. --- 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[] = ''; }