During the hand-in phase of our SCORM 2004 3rd Edition content Moodle presents a "not enough choices: cmi.interactions.N6.correct_responses.N0.pattern" JavaScript alert box and then many consequential ones such as error 408 "Data Model Element Collection Set Out Of Order".
The first alert box appears within Moodle's validation when setting the CMI data model property cmi.interactions.N6.correct_responses.N0.pattern
This happens with a multiple choice question (4 choices) with a single correct response ("D").
elementmodel = "cmi.interactions.n.correct_responses.n.pattern"
element = "cmi.interactions.N6.correct_responses.N0.pattern"
value = "D";
interactiontype = "choice"
The code presenting the error uses the following logic, given that the nodes array in this case represents the possible correct responses of which a single item is sufficient to fulfil the multiple-choice interaction type:
if (interactiontype == 'choice' && nodes.length == 1) {
alert('not enough choices: ' + element);
}
To replicate, try the attached package on the Moodle demo site or a local instance and proceed to the final page from the combo-box at the bottom. Click the 'Submit' button on the right, agree to Hand-in and await the errors.
The faulting code resides within /mod/scorm/datamodels/scorm_13.js.php (around line 582)
- is duplicated by
-
MDL-24529 SCORM 2004 quiz creates an error after answering every question. "Not enough choice, cmi.interactions.N1.correct_responses.N0.pattern"
- Closed