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

SCORM JavaScript syntax error

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.8, 2.8.5
    • Fix Version/s: 2.8.8, 2.9.2
    • Component/s: SCORM
    • Labels:
    • Testing Instructions:
      Hide
      • Create the SCORM activity in the course using this package:
        https://www.dropbox.com/s/rlmbs8rei2uplzi/M%C3%A9tier%20et%20formation.zip?dl=0
        (NOTE: This is a SCORM 2004 package so there may be other issues with it (please ignore or check with Dan before reporting any new issues)
      • Enter the SCORM and answer the questions correctly (see the screenshot with 4 ticks for the right answers)
      • After getting 100% in the question, exit the SCORM activity
      • Enter the SCORM once again in a "Normal" mode and without the selection of "Start a new attempt" checkbox
      • Make sure SCORM package loads correctly.
      Show
      Create the SCORM activity in the course using this package: https://www.dropbox.com/s/rlmbs8rei2uplzi/M%C3%A9tier%20et%20formation.zip?dl=0 (NOTE: This is a SCORM 2004 package so there may be other issues with it (please ignore or check with Dan before reporting any new issues) Enter the SCORM and answer the questions correctly (see the screenshot with 4 ticks for the right answers) After getting 100% in the question, exit the SCORM activity Enter the SCORM once again in a "Normal" mode and without the selection of "Start a new attempt" checkbox Make sure SCORM package loads correctly.
    • Affected Branches:
      MOODLE_28_STABLE
    • Fixed Branches:
      MOODLE_28_STABLE, MOODLE_29_STABLE
    • Pull Master Branch:
      master_MDL-49647

      Description

      There is the syntax error during the SCORM processing ("Uncaught SyntaxError: Unexpected identifier"). Noticed after reattempting the SCORM (without starting a new attempt). The string with a response contains an apostrophe which is not being escaped. In the result, virtual machine which processes the SCORM receives the line like this:

      cmi.interactions1.student_response = 'Observations_of_the_employee's_behavior_conduct_or_appearance';

      I checked the versions of Moodle listed below:

      • 2.7.7 (the issue does not occur)
      • 2.8 (the issue occurs)
      • 2.8.5 (the issue occurs)

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                9 Vote for this issue
                Watchers:
                11 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  14/Sep/15