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

when setting cmi.objectives.0.id in a sco, there are javascript errors that prevent the sco from finding the lms

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.7, 1.7.1
    • Fix Version/s: 1.7.2
    • Component/s: SCORM
    • Labels:
      None
    • Environment:
      scorm 2004
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_17_STABLE
    • Fixed Branches:
      MOODLE_17_STABLE

      Description

      the error is located in moodle\mod\scorm\datamodels\scorm_13.js.php, somewhere around theese lines
      <?php
      $count = 0;
      $objectives = '';
      foreach($userdata as $element => $value){
      if (substr($element,0,14) == 'cmi.objectives') {
      preg_match('/.(\d+)./',$element,$matches);

      the output javascript that produces the error:
      cmi.objectives..N0 = new Object();
      cmi.objectives..N0.score = new Object();
      cmi.objectives..N0.score._children = score_children;
      the api is than broken, and the sco's cannto talk with the lms anymore.

      the bug is triggered when the sco sets "cmi.objectives.0.id". the next time you will enter the course, the javascript code will generate an error, and prevent the api from initializing

        Attachments

          Activity

            People

            • Assignee:
              piers Piers Harding
              Reporter:
              had3z asdf
              Participants:
              Component watchers:
              Damyon Wiese, Dan Marsden, Matteo Scaramuccia, Adrian Greeve, Mihail Geshoski, Peter Dias
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                30/Mar/07