]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-15452 - Fix regressions introduced by my recent work on this bug and its children...
authortjhunt <tjhunt>
Fri, 11 Jul 2008 13:04:09 +0000 (13:04 +0000)
committertjhunt <tjhunt>
Fri, 11 Jul 2008 13:04:09 +0000 (13:04 +0000)
mod/quiz/attempt.php

index 985a7a7f5e83487cf00a79612f47d74864a4520c..4508d5baccd621428ebf704eb1faffdd11cc42e2 100644 (file)
@@ -75,7 +75,7 @@
 /// Add all questions that are on the submitted form
     if ($submittedquestionids) {
         $submittedquestionids = explode(',', $submittedquestionids);
-        $questionids = $questionids + $submittedquestionids;
+        $questionids = array_unique(array_merge($questionids, $submittedquestionids));
     } else {
         $submittedquestionids = array();
     }
         unset($responses->forcenewattempt);
 
     /// Extract the responses. $actions will be an array indexed by the questions ids.
-        $actions = question_extract_responses($attemptobj->get_questions(), $responses, $event);
+        $actions = question_extract_responses($attemptobj->get_questions($questionids),
+                $responses, $event);
 
     /// Process each question in turn
         $success = true;