the version was blank on a package I tried ... this now gives it some sort of

reasonable default (scorm_12)
This commit is contained in:
moodler
2006-11-28 02:50:37 +00:00
parent 954e74f2dd
commit e9dec637ff
+3
View File
@@ -71,6 +71,9 @@
// TOC processing
//
$scorm->version = strtolower(clean_param($scorm->version, PARAM_SAFEDIR)); // Just to be safe
if (empty($scorm->version)) {
$scorm->version = 'scorm_12';
}
require_once($CFG->dirroot.'/mod/scorm/datamodels/'.$scorm->version.'lib.php');
$attempt = scorm_get_last_attempt($scorm->id, $USER->id);
if (($newattempt=='on') && (($attempt < $scorm->maxattempt) || ($scorm->maxattempt == 0))) {