-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 2.1.1, 2.2
-
Fix Version/s: 2.1.2
-
Component/s: Questions
-
Labels:
-
Testing Instructions:
-
Affected Branches:MOODLE_21_STABLE, MOODLE_22_STABLE
-
Fixed Branches:MOODLE_21_STABLE
-
Pull from Repository:
-
Pull Master Branch:
-
Pull Master Diff URL:
I ran into the following error message during the QE2 upgrade from Moodle 1.9 to 2.1
"Coding error detected, it must be fixed by a programmer: Two inconsistent open states for question session 36362."
Situation in the data: The affected question is a multichoice question. The question session turned out to have two start states (event=0), with sequence numbers 0 and 2. The answer in the second one was empty, with the answer string being "8917,8918,8919,8920:" .
The code deals with these bogus start states with empty answers, in question_behaviour_attempt_updater::process0(). However, for determining whether the answer of state is empty, it checks whether the answer is an empty string. This is incorrect in the case of multichoice questions, where the answer string internally records the order of answers. In this case, the code should check whether the answer string ends in ":".
Proposed fix will follow shortly.
- has been marked as being related by
-
MDL-34385 When upgrading from 1.9.17 to 2.2.3, the quiz upgrade has question session errors
-
- Closed
-