MDL-11271 - The closing bracket "}" can't be used in cloze question type. Now, you can excape a closing } with a backslash. Merged from MOODLE_18_STABLE.

This commit is contained in:
tjhunt 2007-09-14 09:34:52 +00:00
parent ace1bf9d8e
commit 9c61c44fc1

View 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];