diff --git a/mod/scorm/view.js b/mod/scorm/view.js index a5487f1..77d1a83 100644 --- a/mod/scorm/view.js +++ b/mod/scorm/view.js @@ -63,6 +63,19 @@ M.mod_scormform.init = function(Y) { scormintro.setHTML(M.str.scorm.popupsblocked); }}, 800); } + + var setlaunchoptions = function() { + 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' : ''); + } if (launch == true) { setlaunchoptions(); @@ -80,17 +93,4 @@ M.mod_scormform.init = function(Y) { e.preventDefault(); }, scormform); } - - var setlaunchoptions = function() { - 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' : ''); - } }