Permalink
Browse files

Patched the auto-continue feature

  • Loading branch information...
1 parent fe65713 commit de8595db91abe40f46cecee1540934a1d5f9f993 bobopinna committed Jun 30, 2004
Showing with 13 additions and 10 deletions.
  1. +5 −5 mod/scorm/api1_2.php
  2. +7 −5 mod/scorm/lib.php
  3. +1 −0 mod/scorm/mod.html
View
10 mod/scorm/api1_2.php
@@ -28,10 +28,10 @@ function LMSInitialize (param) {
cmi.core.credit = "credit";
cmi.core.lesson_status = "<?php echo $sco_user->cmi_core_lesson_status; ?>";
cmi.core.exit = "<?php echo $sco_user->cmi_core_exit ?>";
- cmi.core.entry = "<?php if ($sco_user->cmi_core_lesson_status=="not attempted")
+ cmi.core.entry = "<?php if ($sco_user->cmi_core_lesson_status=='not attempted')
echo 'ab-initio';
else
- if ($sco_user->cmi_core_lesson_status!="completed")
+ if ($sco_user->cmi_core_lesson_status!='completed')
echo 'resume';
else
echo '';?>";
@@ -211,10 +211,10 @@ function LMSFinish (param) {
<?php
if ($scorm->auto) {
if ($sco != $last) {
- print "setTimeout('".$navObj."document.navform.next.click();',500);\n";
+ echo "setTimeout('".$navObj."document.navform.next.click();',500);\n";
} else {
- print "exitloc = '".$CFG->wwwroot."/mod/scorm/view.php?id=$cm->id';\n";
- print "setTimeout('top.location = exitloc;',500);\n";
+ echo "exitloc = '".$CFG->wwwroot."/mod/scorm/view.php?id=".$cm->id."';\n";
+ echo "setTimeout('top.location = exitloc;',500);\n";
}
}
?>
View
12 mod/scorm/lib.php
@@ -46,10 +46,12 @@ function scorm_add_instance($scorm) {
}
}
$scorm->popup = implode(',', $optionlist);
- $scorm->auto = '0';
+
- if ($scorm->popup != "")
+ if ($scorm->popup != "") {
$scorm->popup .= ',location=0,menubar=0,toolbar=0';
+ $scorm->auto = '0';
+ }
return insert_record("scorm", $scorm);
}
@@ -75,11 +77,11 @@ function scorm_update_instance($scorm) {
}
}
$scorm->popup = implode(',', $optionlist);
- $scorm->auto = '0';
- if ($scorm->popup != "")
+ if ($scorm->popup != "") {
$scorm->popup .= ',location=0,menubar=0,toolbar=0';
-
+ $scorm->auto = '0';
+ }
return update_record("scorm", $scorm);
}
View
1 mod/scorm/mod.html
@@ -61,6 +61,7 @@
<input type="hidden" name=datadir value="<?php p($form->datadir) ?>">
<input type="hidden" name=launch value="<?php p($form->launch) ?>">
<input type="hidden" name=popup value="<?php p($form->popup) ?>">
+ <input type="hidden" name=auto value="<?php p($form->auto) ?>">
<input type="hidden" name=section value="<?php p($form->section) ?>">
<input type="hidden" name=module value="<?php p($form->module) ?>">
<input type="hidden" name=modulename value="<?php p($form->modulename) ?>">

0 comments on commit de8595d

Please sign in to comment.