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

support SCORM packages with empty organization field

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Minor
    • 3.3
    • 2.9.3
    • SCORM

    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

              danmarsden Dan Marsden
              andrew_dc_hancox Andrew Hancox
              Ankit Agarwal Ankit Agarwal
              Dan Poltawski Dan Poltawski
              Rajesh Taneja Rajesh Taneja
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Clockify

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.