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:
@@ -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))) {
|
||||
|
||||
Reference in New Issue
Block a user