Skip to content

Commit

Permalink
MDL-32388 SCORM: Fix chrome pop-ups
Browse files Browse the repository at this point in the history
  • Loading branch information
danmarsden committed Apr 11, 2012
1 parent 58be053 commit 6db00e4
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions mod/scorm/player.php
Expand Up @@ -297,19 +297,19 @@
//<![CDATA[
scorm_resize(<?php echo $scorm->width.", ". $scorm->height; ?>);
function openpopup(url,name,options,width,height) {
fullurl = "<?php echo $CFG->wwwroot.'/mod/scorm/' ?>" + url;
windowobj = window.open(fullurl,name,options);
if ((width==100) && (height==100)) {
// Fullscreen
windowobj.moveTo(0,0);
}
if (width<=100) {
width = Math.round(screen.availWidth * width / 100);
}
if (height<=100) {
height = Math.round(screen.availHeight * height / 100);
}
windowobj.resizeTo(width,height);
options += ",width="+width+",height="+height;
fullurl = "<?php echo $CFG->wwwroot.'/mod/scorm/' ?>" + url;
windowobj = window.open(fullurl,name,options);
if ((width==100) && (height==100)) {
// Fullscreen
windowobj.moveTo(0,0);
}
windowobj.focus();
return windowobj;
}
Expand Down

0 comments on commit 6db00e4

Please sign in to comment.