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

Courselab SCORM with duplicate identifiers fails to load.


    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 2.7.7
    • SCORM

      Some scorm objets that run without problem in previous moodle versions (1.8 and 1.9 verified) doesn't show in version 2.7. When teacher or learner try to select it, they obtain a moodle page showing only the scorm description without enter or preview buttons.

      The problem has been detected when scorm file was created with CourseLab and the scorm and organization identifier is the same as first section (item tag).

      If it happens, then Moodle code enters into infinity recursive loop calling scorm_format_toc_for_treeview( ) function while it tries to build the SCORM TOC.

      If you want to solve this problem without modify your original and future SCORM objects you must change the scorm_get_toc_object function to detect possible recursion and avoid it by changing the identifier. This sample code inserted just before 1515 line in locallib.php provides a solution:

      // CourseLab Identifier fix
      foreach ($result as $sco)

      { if (($sco->parent != '/') and ($sco->parent == $sco->identifier) ) $sco->identifier = '_' . $sco->identifier; }

      1515 // Get parent scoes! ( just before this line)

      Thank you in advanced

            Unassigned Unassigned
            adolfoma Adolfo Muñoz Aguilar
            0 Vote for this issue
            3 Start watching this issue


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