]> git.mjollnir.org Git - moodle.git/commitdiff
Bug #5506: Fix for calculated questions where each one builds on the last. Merged...
authortjhunt <tjhunt>
Tue, 6 Jun 2006 14:29:05 +0000 (14:29 +0000)
committertjhunt <tjhunt>
Tue, 6 Jun 2006 14:29:05 +0000 (14:29 +0000)
mod/quiz/attempt.php

index bb72cdc8a79bea0cb6d59c86275ac7a557143a5b..e3a1ffc630cdfc56cbc370aeb973e4353ff0f3b7 100644 (file)
 
             // Process these responses ...
             question_process_responses($questions[$i], $states[$i], $action, $quiz, $attempt);
+
+            // Fix for Bug #5506: When each attempt is built on the last one,
+            // preserve the options from any previous attempt. 
+            if ( isset($laststate->options) ) {
+                $states[$i]->options = $laststate->options;
+            }
+
             // ... and save the new states
             save_question_session($questions[$i], $states[$i]);
         }