]> git.mjollnir.org Git - moodle.git/commitdiff
Bug 5971 - Allow matching questions to have extra wrong answers - supplimental. And...
authortjhunt <tjhunt>
Wed, 5 Jul 2006 12:00:23 +0000 (12:00 +0000)
committertjhunt <tjhunt>
Wed, 5 Jul 2006 12:00:23 +0000 (12:00 +0000)
question/type/match/questiontype.php

index a621bed1c08a8a115d71782141e2f1de57ad78da..2340f2af209fd957b8cea6248b0d146eb7b05194 100644 (file)
@@ -307,7 +307,7 @@ class question_match_qtype extends default_questiontype {
 
     // ULPGC ecastro for stats report
     function get_all_responses($question, $state) {
-        $answers = new stdClass;
+        $answers = array();
         if (is_array($question->options->subquestions)) {
             foreach ($question->options->subquestions as $aid=>$answer) {
                 $r = new stdClass;
@@ -316,7 +316,7 @@ class question_match_qtype extends default_questiontype {
                 $answers[$aid] = $r;
             }
         } else {
-            $answers[]="error"; // just for debugging, eliminate
+            $answers[] = "error"; // just for debugging, eliminate
         }
         $result = new stdClass;
         $result->id = $question->id;