mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 12:32:08 +02:00
MDL-46760 mod_scorm: Fix js error when preview mode disabled
This commit is contained in:
parent
e1eb180806
commit
98c59aaab2
@ -82,8 +82,14 @@ M.mod_scormform.init = function(Y) {
|
||||
}
|
||||
|
||||
var setlaunchoptions = function() {
|
||||
var mode = Y.one('#scormviewform input[name=mode]:checked').get('value');
|
||||
launch_url += '&mode=' + (mode ? mode : 'normal');
|
||||
var mode = Y.one('#scormviewform input[name=mode]:checked');
|
||||
if (mode) {
|
||||
var modevalue = mode.get('value');
|
||||
launch_url += '&mode=' + (modevalue ? modevalue : 'normal');
|
||||
} else {
|
||||
launch_url += '&mode=normal';
|
||||
}
|
||||
|
||||
var newattempt = Y.one('#scormviewform #a');
|
||||
launch_url += (newattempt && newattempt.get('checked') ? '&newattempt=on' : '');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user