From: tjhunt <tjhunt>
Date: Mon, 17 Dec 2007 15:29:48 +0000 (+0000)
Subject: Unset a meaningless id. This probably does not change anything in moodle, but it... 
X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=8ad877b6ad3a70cf4011f8c23f2e22dc7d119797;p=moodle.git

Unset a meaningless id. This probably does not change anything in moodle, but it was part of a bug fix in the OU version of Moodle that seemed correct, so I am merging it over.
---

diff --git a/lib/questionlib.php b/lib/questionlib.php
index f6d9711879..e702365046 100644
--- a/lib/questionlib.php
+++ b/lib/questionlib.php
@@ -688,6 +688,7 @@ function get_question_states(&$questions, $cmoptions, $attempt, $lastattemptid =
                 // Restore the state so that the responses will be restored
                 restore_question_state($questions[$i], $laststate);
                 $states[$i] = clone($laststate);
+                unset($states[$i]->id);
             } else {
                 // create a new empty state
                 $states[$i] = new object;