diff --git a/mod/scorm/module.js b/mod/scorm/module.js index 30fa4b9b84e..4bc1285d425 100644 --- a/mod/scorm/module.js +++ b/mod/scorm/module.js @@ -112,17 +112,25 @@ M.mod_scorm.init = function(Y, hide_nav, hide_toc, toc_title, window_name, launc if (!window_name && node.title != null) { obj.setAttribute('data', url_prefix + node.title); } - if (window_name) { - var mine = window.open('','','width=1,height=1,left=0,top=0,scrollbars=no'); - if(! mine) { - alert(M.str.scorm.popupsblocked); - } - mine.close() + if (window_name) { + var mine = window.open('','','width=1,height=1,left=0,top=0,scrollbars=no'); + if(! mine) { + alert(M.str.scorm.popupsblocked); } + mine.close() + } } var old = YAHOO.util.Dom.get('scorm_object'); if (old) { - content.replaceChild(obj, old); + if(window_name) { + var cwidth = scormplayerdata.cwidth; + var cheight = scormplayerdata.cheight; + var poptions = scormplayerdata.popupoptions; + scorm_openpopup("loadSCO.php?" + node.title, window_name, poptions, cwidth, cheight); + } + else { + content.replaceChild(obj, old); + } } else { content.appendChild(obj); } diff --git a/mod/scorm/player.php b/mod/scorm/player.php index eec8de39dd7..3e1e02f437e 100755 --- a/mod/scorm/player.php +++ b/mod/scorm/player.php @@ -154,7 +154,8 @@ $PAGE->set_button($exitlink); - $PAGE->requires->data_for_js('scormplayerdata', Array('cwidth'=>$scorm->width,'cheight'=>$scorm->height), true); + $PAGE->requires->data_for_js('scormplayerdata', Array('cwidth'=>$scorm->width,'cheight'=>$scorm->height, + 'popupoptions' => $scorm->options), true); $PAGE->requires->js('/mod/scorm/request.js', true); $PAGE->requires->js('/lib/cookies.js', true); //$PAGE->requires->js('/mod/scorm/loaddatamodel.php?id='.$cm->id.$scoidstr.$modestr.$attemptstr, true);