MDL-39546 Lesson module: removed duplicate to decode special characters
authorRossiani Wijaya <rwijaya@moodle.com>
Tue, 28 May 2013 04:31:18 +0000 (12:31 +0800)
committerSam Hemelryk <sam@moodle.com>
Mon, 1 Jul 2013 21:35:40 +0000 (09:35 +1200)
mod/lesson/pagetypes/matching.php

index 63dff7b..9082c9f 100644 (file)
@@ -180,7 +180,7 @@ class lesson_page_type_matching extends lesson_page {
                 return $result;
             }
             $value = htmlspecialchars_decode($value);
-            $userresponse[] = htmlspecialchars_decode($value);
+            $userresponse[] = $value;
             // Make sure the user's answer exists in question's answer
             if (array_key_exists($id, $answers)) {
                 $answer = $answers[$id];
@@ -524,7 +524,7 @@ class lesson_display_answer_form_matching extends moodleform {
                 $responseid = 'response['.$answer->id.']';
                 if ($hasattempt) {
                     $responseid = 'response_'.$answer->id;
-                    $mform->addE lement('hidden', 'response['.$answer->id.']', htmlspecialchars($useranswers[$i]));
+                    $mform->addElement('hidden', 'response['.$answer->id.']', htmlspecialchars($useranswers[$i]));
                     $mform->setType('response['.$answer->id.']', PARAM_TEXT);
                 }
                 $mform->addElement('select', $responseid, format_text($answer->answer,$answer->answerformat,$options), $responseoptions, $disabled);