Details
Description
When we load a SCORM 2004 conformant package in Moodle we experience a JavaScript error on first content load. This happens within the following script written by /mod/scorm/api.php:
cmi.interactions.N0 = new Object();
cmi.interactions.N0.objectives = new Object();
cmi.interactions.N0.objectives._children = objectives_children;
cmi.interactions.N0.correct_responses = new Object();
cmi.interactions.N0.correct_responses._children = correct_responses_children;
cmi.interactions.N0.type = 'true-false';
cmi.interactions.N0.weighting = '1';
cmi.interactions.N0.correct_responses = new Object();
cmi.interactions.N0.correct_responses.N0 = new Object();
cmi.interactions.N0.correct_responses.N0.pattern = 'false';
cmi.interactions.N0.result = 'incorrect';
cmi.interactions.N0.timestamp = '2009-02-10T11:03:38';
cmi.interactions.N0.description = 'The movement of a hydraulic actuator is limited to linear motion. Is this true?';
cmi.interactions.N0.id = 'urn:LJCreate:Interaction-M2582801-C004-2_1';
cmi.interactions_N0.correct_responses._count = 1; // 'interactions_N0.correct_responses' is null or not an object !
cmi.interactions.N0.objectives = new Object();
cmi.interactions.N0.objectives.N0 = new Object();
cmi.interactions.N0.objectives.N0.id = 'urn:LJCreate:Objective-M2582801-C004-1';
cmi.interactions_N0.objectives._count = 1; // Will happen here too!
It appears that an underscore has not been correctly substituted for a dot when resolving the JavaScript object hierarchy.
The above script was created by the /mod/scorm/datamodels/scorm_13.js.php file.
Our test package can be downloaded from the following URL (25.4 MB)
http://download.ljgroup.com/users/SCORM/M2582801_C004-Hydraulics._Engineering_-Actuators.zip