diff --git a/mod/quiz/questiontypes/match/questiontype.php b/mod/quiz/questiontypes/match/questiontype.php index a2fe0436997..9330a4ec8f1 100644 --- a/mod/quiz/questiontypes/match/questiontype.php +++ b/mod/quiz/questiontypes/match/questiontype.php @@ -216,7 +216,8 @@ class quiz_match_qtype extends quiz_default_questiontype { ///// Print the input controls ////// echo '
| '; @@ -268,7 +269,7 @@ class quiz_match_qtype extends quiz_default_questiontype { $sumgrade = 0; foreach ($subquestions as $key => $sub) { - if (isset($responses[$key]) and isset($sub->options->answers[$responses[$key]])) { + if (isset($sub->options->answers[$responses[$key]])) { $sumgrade += $sub->options->answers[$responses[$key]]->fraction; } } diff --git a/mod/quiz/questiontypes/multianswer/questiontype.php b/mod/quiz/questiontypes/multianswer/questiontype.php index bb8ef7a3a97..82a182d296d 100644 --- a/mod/quiz/questiontypes/multianswer/questiontype.php +++ b/mod/quiz/questiontypes/multianswer/questiontype.php @@ -457,7 +457,8 @@ function quiz_qtype_multianswer_extract_question($text) { $wrapped->answer = array(); $wrapped->fraction = array(); $wrapped->feedback = array(); - $wrapped->questiontext = $answerregs[0]; //addslashes($answerregs[0]); + $wrapped->questiontext = addslashes(str_replace('&\#', '', + $answerregs[0])); $wrapped->questiontextformat = 0; $remainingalts = $answerregs[ANSWER_REGEX_ALTERNATIVES]; |