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

SCORM and New Window does not work when preview disabled.

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Add a SCORM to a course using the following settings:
      Display package: New window
      Disable preview mode: Yes
      Enter the SCORM and check to make sure the pop-up window with the scorm package occurs.

      Show
      Add a SCORM to a course using the following settings: Display package: New window Disable preview mode: Yes Enter the SCORM and check to make sure the pop-up window with the scorm package occurs.
    • Affected Branches:
      MOODLE_26_STABLE, MOODLE_27_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE, MOODLE_27_STABLE
    • Pull Master Branch:
      master_MDL-46760

      Description

      Guys,
      There is a bug for a new Scorm object fix from https://tracker.moodle.org/browse/MDL-46236 which prevents "New Window" from coming up with the option "Disable Preview mode" > Yes.

      Affected code: mod/scorm/view.js
      The problem comes from this code:

      var mode = Y.one('#scormviewform input[name=mode]:checked').get('value');
      

      where it is undefined, meaning, the browser cannot find the control.
      To fix it, I have added a check to find the control before getting the value.

      var modeinputexist = Y.one('#scormviewform input[name=mode]:checked');
      if (modeinputexist)
      { var mode = Y.one('#scormviewform input[name=mode]:checked').get('value'); if (mode) launch_url += '&mode=' + (mode ? mode : 'normal'); }
      

      For people who encounter "New Window" problem...

        Attachments

          Issue Links

            Activity

              People

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

                Dates

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