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

support SCORM packages with empty organization field

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.9.3
    • Fix Version/s: 3.3
    • Component/s: SCORM
    • Labels:

      Description

      Error in scorm player (TypeError: datamodel.undefined is undefined) when trying to load a SCORM package that has no organization structure defined in imsmanifest.xml

      The Moodle scorm API attempts to get the current scoe from the non-existent navigation menu.
      This seems to be an issue that has been introduced in the move from YUI2 to YUI3.

      In YUI2 when you initialise a treeview control against a dom element that does not exist it returns undefined which means that in the following code in scorm_12.js:
      function LMSInitialize (param) {
      scoid = scorm_current_node ? scorm_current_node.scoid : scoid;

      the application falls back to using the scoid from the URL.
      In YUI3 when you initialise a treeview control against a dom element that does not exist it returns some kind of weird empty treeview so the the code above overwrites the correctly set scoid with the non-existent scoid property causing the error. Changing the line to:

      function LMSInitialize (param) {
      scoid = (scorm_current_node && scorm_current_node.scoid) ? scorm_current_node.scoid : scoid;

      solves the problem.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  15/May/17