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

SCORM 2004 JS Errors

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 1.9.9
    • 1.9.7
    • SCORM
    • None
    • Apache Linux Debian
    • MySQL
    • MOODLE_19_STABLE
    • MOODLE_19_STABLE
    • Moderate

      Try the attached package in the latest stable Moodle environment.

      On save/suspend of the data model I receive a warning about insufficient choices for the correct_responses pattern. On debugging I found this to be a single alert() error in the code that doesn't really apply when setting the correct answer to a multi-choice question.

      However, the more concerning problem is that when the session is resumed the JavaScript outputted by Moodle is syntactically invalid and causes the whole SCORM 2004 support to fail. The affected JS is part of data model reinitialisation:

      cmi.interactions.N0 = new Object();
      cmi.interactions.N0.objectives = new Object();
      cmi.interactions.N0.objectives._children = objectives_children;
      cmi.interactions.N0.correct_responses = new Object();
      cmi.interactions.N0.correct_responses._children = correct_responses_children;
      cmi.interactions.N0.type = 'true-false';
      cmi.interactions.N0.weighting = '1';
      cmi.interactions.N0.correct_responses = new Object();
      cmi.interactions.N0.correct_responses.N0 = new Object();
      cmi.interactions.N0.correct_responses.N0.pattern = 'true';
      cmi.interactions.N0.result = 'correct';
      cmi.interactions.N0.timestamp = '2010-01-19T12:27:41';
      cmi.interactions.N0.description = 'Does lamp LP A light up?';
      cmi.interactions_N0.correct_responses._count = 1;
      cmi.interactions.N0.objectives = new Object();
      cmi.interactions.N0.objectives.N0 = new Object();
      cmi.interactions.N0.objectives.N0.id = 'urn:LJCreate:Objective-M2470001-C001-1';
      cmi.interactions.N0.id = 'urn:LJCreate:Interaction-M2470001-C001-2_1';
      cmi.interactions.N0.learner_response = 'true';
      cmi.interactions_N0.objectives._count = 1;

      The problem there is that underscores are appearing instead of object namespace dots for the ._count fields.

            danmarsden Dan Marsden
            pinkduck Peter Chamberlin
            Nobody Nobody
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

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