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

JavaScript error trying to launch SCO with wrong id (Using MDL-27036 AICC HACP test package)


    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 2.5.1, 2.6
    • SCORM
    • None

      While trying to test AICC HACP on latest Moodle master branch (20/7/2013)
      I got the following JS error:

      Uncaught TypeError: Cannot read property 'url' of undefined 

      for the javascript scorm/module.js ~ 533 :

      scorm_first_url.title = scoes_nav[launch_sco].url;

      launch_sco has the wrong value (96) and should be 95.

      I am using the MDL-27036 AICC HACP test package. (Attached to this issue too)

      Digging into the code, I think I found the problem:
      scorm/locallib.php ~ 1775

      if (empty($scoid)) {
              $result->sco = $scoes['scoes'][0]->children[0];
          } else {

      Should, probably, be:

      if (empty($scoid)) {
              $result->sco = $scoes['scoes'][0]->id;
          } else {

      If changed, It seems to work fine. But, I am not sure I fully get the complexity of the code (after hours of xdebug!) so...
      Dan, What do you think?

            danmarsden Dan Marsden
            nadavkav Nadav Kavalerchik
            Dan Marsden Dan Marsden
            0 Vote for this issue
            4 Start watching this issue


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