Fixed last Explorer popup bug and added user score view
[moodle.git] / mod / scorm / scormAPI.php
index ac5e33b..ff4a4de 100755 (executable)
@@ -158,10 +158,14 @@ function SCOInitialize() {
        print "\t".$navObj."document.navform.next.style.display = 'none';\n";
     }
 ?>
-       top.main.location="<?php echo $result; ?>";
-<?php  if ($scorm->popup == "") { ?>
-       hilightcurrent(<?php echo $navObj ?>document.navform.courseStructure);
-<?php   } ?>
+<?php  
+    if ($scorm->popup == "") { 
+       echo "\t    top.main.location=\"$result\";\n";
+       echo "\t    hilightcurrent(".$navObj."document.navform.courseStructure);\n";
+    } else {
+       echo "\t    top.main = window.open('$result','main','$scorm->popup');\n";
+    }
+?>
 } 
 
 function changeSco(direction) {