Patched the auto-continue feature

This commit is contained in:
bobopinna 2004-06-30 12:25:12 +00:00
parent fe6571366c
commit de8595db91
3 changed files with 13 additions and 10 deletions

View File

@ -28,10 +28,10 @@ function SCORMapi() {
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 SCORMapi() {
<?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 File

@ -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 File

@ -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) ?>">