Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-18202

JavaScript Error on Session Resume

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.9.4
    • 1.9.9
    • SCORM
    • None
    • Debian Linux
    • MySQL
    • MOODLE_19_STABLE
    • MOODLE_19_STABLE
    • Easy

    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

      Attachments

        Issue Links

          Activity

            People

              danmarsden Dan Marsden
              pinkduck Peter Chamberlin
              Dan Marsden, Matteo Scaramuccia, Ilya Tregubov, Kevin Percy, Mathew May, Mihail Geshoski, Shamim Rezaie
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                8/Jun/10