-
Bug
-
Resolution: Fixed
-
Critical
-
2.6.5, 2.7.1, 2.7.2
-
MOODLE_26_STABLE, MOODLE_27_STABLE
-
MOODLE_26_STABLE, MOODLE_27_STABLE
-
master_
MDL-46760 -
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...
- blocks
-
MDL-46669 mod_scorm: GetValue adds quotes to string values, in 1.3 copy only
- Closed
-
MDL-45887 Fix coding guideline violations in mod_scorm
- Closed
- has been marked as being related by
-
MDL-46790 Scorm New Window Settings
- Closed
- is a regression caused by
-
MDL-46236 Start New Attempt option is ignored if SCORM is set to appear in a popup
- Closed
- is duplicated by
-
MDL-46841 SCORM new window error - possibly javascript
- Closed
-
MDL-46940 SCORM activity popup does not work when "Disable preview mode" is set to Yes
- Closed