]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-11271 - The closing bracket "}" can't be used in cloze question type. Now, you...
authortjhunt <tjhunt>
Fri, 14 Sep 2007 09:34:52 +0000 (09:34 +0000)
committertjhunt <tjhunt>
Fri, 14 Sep 2007 09:34:52 +0000 (09:34 +0000)
question/type/multianswer/questiontype.php

index 155dfa497d7373a8be6f42bb8f081634054fad4e..d66c6526f47e546330c65a3cd93e4757492c16d1 100644 (file)
@@ -715,7 +715,8 @@ function qtype_multianswer_extract_question($text) {
                 }
             } else { // Tolerance can stay undefined for non numerical questions
                 // Undo quoting done by the HTML editor.
-                $wrapped->answer[] = html_entity_decode($altregs[ANSWER_ALTERNATIVE_REGEX_ANSWER], ENT_QUOTES, 'UTF-8');
+                $answer = html_entity_decode($altregs[ANSWER_ALTERNATIVE_REGEX_ANSWER], ENT_QUOTES, 'UTF-8');
+                $wrapped->answer[] = str_replace('\}', '}', $answer);
             }
             $tmp = explode($altregs[0], $remainingalts, 2);
             $remainingalts = $tmp[1];