hopefully fixed undefined $t
authorPetr Skoda <skodak@moodle.org>
Sat, 18 Sep 2010 13:14:43 +0000 (13:14 +0000)
committerPetr Skoda <skodak@moodle.org>
Sat, 18 Sep 2010 13:14:43 +0000 (13:14 +0000)
mod/lesson/pagetypes/matching.php

index c5c7f6d..7bad478 100644 (file)
@@ -481,7 +481,7 @@ class lesson_display_answer_form_matching extends moodleform {
                 $mform->addElement('select', 'response['.$answer->id.']', format_text($answer->answer,$answer->answerformat,$options), $responseoptions);
                 $mform->setType('response['.$answer->id.']', PARAM_TEXT);
                 if (isset($USER->modattempts[$lessonid])) {
-                    $mform->setDefault('response['.$answer->id.']', htmlspecialchars(trim($answers[$useranswers[$t]]->response)));
+                    $mform->setDefault('response['.$answer->id.']', htmlspecialchars(trim($answers[$useranswers[$i]]->response))); //TODO: this is suspicious
                 } else {
                     $mform->setDefault('response['.$answer->id.']', 'answeroption');
                 }