Issue Details (XML | Word | Printable)

Key: MDL-18202
Type: Bug Bug
Status: Open Open
Priority: Minor Minor
Assignee: Dan Marsden
Reporter: Peter Chamberlin
Votes: 0
Watchers: 0
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

JavaScript Error on Session Resume

Created: 10/Feb/09 08:19 PM   Updated: 11/Feb/09 04:31 AM
Component/s: SCORM
Affects Version/s: 1.9.4
Fix Version/s: None

Environment: Debian Linux
Issue Links:
Relates
 

Database: MySQL
Participants: Dan Marsden and Peter Chamberlin
Security Level: None
Difficulty: Easy
Affected Branches: MOODLE_19_STABLE


 Description  « Hide
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

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.