From: tjhunt Date: Fri, 11 Jul 2008 13:04:09 +0000 (+0000) Subject: MDL-15452 - Fix regressions introduced by my recent work on this bug and its children... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=a0083206b8baa8910e36dfe8ebb762b63ace0eab;p=moodle.git MDL-15452 - Fix regressions introduced by my recent work on this bug and its children. Thanks to Paul Johnson for his testing. --- diff --git a/mod/quiz/attempt.php b/mod/quiz/attempt.php index 985a7a7f5e..4508d5bacc 100644 --- a/mod/quiz/attempt.php +++ b/mod/quiz/attempt.php @@ -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(); } @@ -116,7 +116,8 @@ 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;