]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed a problem with Firefox
authorbobopinna <bobopinna>
Tue, 26 Sep 2006 10:26:03 +0000 (10:26 +0000)
committerbobopinna <bobopinna>
Tue, 26 Sep 2006 10:26:03 +0000 (10:26 +0000)
mod/scorm/lib.php
mod/scorm/mod.html

index c7338ff099458fef1f14c132bb3b6f1aa485552a..c8b448e19bb63999e16a3be2247149bb55f91710 100755 (executable)
@@ -87,7 +87,11 @@ function scorm_update_instance($scorm) {
             delete_records('scorm_sequencing_rulecondition','scormid',$scorm->id);
 */
         $scorm->launch = scorm_parse($scorm);
+    } else {
+        $oldscorm = get_record('scorm','id',$scorm->id);
+        $scorm->reference = $oldscorm->reference; // This fix a problem with Firefox when the teacher choose Cancel on overwrite question
     }
+    
     return update_record('scorm', $scorm);
 }
 
index 113c5e79c2f71a6e3e4a6cc4bbc4f46f7aa8f677..60c5d93a9581d6020a7fd73eec2f5b0d67212f29 100755 (executable)
     }
 </script>
 
-<form name="form" method="post" action="mod.php?goto=" onsubmit="return validate_scorm(document.form,document.form.reference.value,false,false);">
+<form name="form" method="post" action="mod.php?goto=" onsubmit="return validate_scorm(document.form,document.form.reference.value,false)">
     <table cellpadding="5">
         <tr valign="top">
             <td align="right"><b><?php print_string('name') ?>:</b></td>