Permalink
Browse files

fixed a problem with Firefox and bad schema version

  • Loading branch information...
1 parent 7f4e5cc commit 23f6c62b6286b121967da53bb8458947c845921f bobopinna committed May 18, 2005
Showing with 11 additions and 6 deletions.
  1. +5 −4 mod/scorm/lib.php
  2. +5 −1 mod/scorm/loadSCO.php
  3. +1 −1 mod/scorm/playscorm.php
View
9 mod/scorm/lib.php
@@ -413,10 +413,11 @@ function scorm_endElement($parser, $name) {
$manifest = '';
}
if ($name == 'SCHEMAVERSION') {
- if (preg_match("/(\d+)\.(\d+)$/",$datacontent,$matches)) {
- $version = 'SCORM_'.$matches[1].'.'.$matches[2];
- }
- //$version = $datacontent;
+ if (preg_match("/^(1\.2)$|^(CAM )?(1\.3)$/",$datacontent,$matches)) {
+ $version = 'SCORM_'.$matches[count($matches)-1];
+ } else {
+ $version = 'SCORM_1.2';
+ }
}
}
View
6 mod/scorm/loadSCO.php
@@ -101,7 +101,11 @@
<html>
<head>
<title>LoadSCO</title>
- <meta http-equiv="refresh" content="1;URL=<?php echo $result ?>" />
+ <script language="javascript" type="text/javascript">
+ <!--
+ setTimeout('document.location = "<?php echo $result ?>";',1000);
+ -->
+ </script>
</head>
<body>
&nbsp;
View
2 mod/scorm/playscorm.php
@@ -142,7 +142,7 @@
text-indent:-4ex;
}
</style>
- <script language="Javascript">
+ <script language="javascript" type="text/javascript">
<!--
function playSCO(scoid) {
if (scoid == 0) {

0 comments on commit 23f6c62

Please sign in to comment.