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

Bug with SCORM restore

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: None
    • Component/s: Backup
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE

      Description

      Hi Eloy,

      I've been struggling with a strange bug in the SCORM restore

      the function process_scorm_sco appears to be called with invalid data when the 2nd "sco" is being handled. I've attached the scorm.xml for this restore to this bug

      when the first SCO is parsed into process_scorm_sco the data looks like this:
      Array
      (
      [id] => 1
      [manifest] => LMS_Test_2.0-MANIFEST
      [organization] =>
      [parent] => /
      [identifier] => TOC1
      [launch] =>
      [scormtype] =>
      [title] => TSD SCORM Diagnostics
      [sco_datas] =>

      [seq_ruleconds] =>

      [seq_rolluprules] =>

      [seq_objectives] =>

      [sco_tracks] =>

      )

      The 2nd sco that is parsed looks like this (note the missing empty items at the end:
      Array
      (
      [id] => 2
      [manifest] => LMS_Test_2.0-MANIFEST
      [organization] => TOC1
      [parent] => TOC1
      [identifier] => I_SCO0
      [launch] => lms_test2.html
      [scormtype] => sco
      [title] => SCORM 1.2 Diagnostic Tool
      )

      Then for some reason a 2nd call to process_scorm_sco is made with invalid data like this:
      Array
      (
      [seq_ruleconds] =>

      [seq_rolluprules] =>

      [seq_objectives] =>

      )

      I've added a check to the process_scorm_sco function to ignore bad data being passed to it, but can you see why this is being parsed incorrectly?

      This behaviour seems to occur for several SCORM objects I have set up - the first SCO is always passed correctly,

      Thanks,

        Attachments

          Activity

            People

            • Assignee:
              danmarsden Dan Marsden
              Reporter:
              danmarsden Dan Marsden
              Tester:
              Nobody
              Participants:
              Component watchers:
              Adrian Greeve, Mihail Geshoski, Peter Dias
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: