Bug #5506: Fix for calculated questions where each one builds on the last. Merged from MOODLE_16_STABLE.

This commit is contained in:
tjhunt
2006-06-06 14:29:05 +00:00
parent 4919564de9
commit 7d83bbc2bd
+7
View File
@@ -323,6 +323,13 @@
// 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]);
}