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

SCORM and New Window does not work when preview disabled.

XMLWordPrintable

    • MOODLE_26_STABLE, MOODLE_27_STABLE
    • MOODLE_26_STABLE, MOODLE_27_STABLE
    • master_MDL-46760
    • 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.

      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...

            danmarsden Dan Marsden
            lersheng Hansen Ler
            Damyon Wiese Damyon Wiese
            Adrian Greeve Adrian Greeve
            Votes:
            5 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved:

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