mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 08:55:15 +02:00
Merge branch 'MDL-46236' of git://github.com/nobelium/moodle
This commit is contained in:
commit
2ac36ad587
@ -65,6 +65,7 @@ M.mod_scormform.init = function(Y) {
|
||||
}
|
||||
|
||||
if (launch == true) {
|
||||
setlaunchoptions();
|
||||
winobj = window.open(launch_url,'Popup', poptions);
|
||||
this.target='Popup';
|
||||
scormredirect(winobj);
|
||||
@ -72,10 +73,18 @@ M.mod_scormform.init = function(Y) {
|
||||
// Listen for view form submit and generate popup on user interaction.
|
||||
if (scormform) {
|
||||
Y.on('submit', function(e) {
|
||||
setlaunchoptions();
|
||||
winobj = window.open(launch_url, 'Popup', poptions);
|
||||
this.target='Popup';
|
||||
scormredirect(winobj);
|
||||
e.preventDefault();
|
||||
}, scormform);
|
||||
}
|
||||
|
||||
var setlaunchoptions = function() {
|
||||
var mode = Y.one('#scormviewform input[name=mode]:checked').get('value');
|
||||
launch_url += '&mode=' + (mode ? 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