MDL-50972 mod_scorm: set autocommit as boolean

var currently passed as string so not evaluated correctly
This commit is contained in:
Dan Marsden 2015-11-27 21:13:58 +13:00
parent 0dfcc2541a
commit 2e6c821d35
2 changed files with 2 additions and 0 deletions

View File

@ -51,6 +51,7 @@ if (intval(get_config("scorm", "scorm12standard"))) {
$cmistring4096 = $cmistring256;
}
$scorm->autocommit = ($scorm->autocommit === "1") ? true : false;
$PAGE->requires->js_init_call('M.scorm_api.init', array($def, $cmiobj, $cmiint, $cmistring256, $cmistring4096,
scorm_debugging($scorm), $scorm->auto, $scorm->id, $CFG->wwwroot,
sesskey(), $scoid, $attempt, $mode, $id, $currentorg, $scorm->autocommit));

View File

@ -47,6 +47,7 @@ if ($scoes = $DB->get_records('scorm_scoes', array('scorm' => $scorm->id), 'sort
}
}
$scorm->autocommit = ($scorm->autocommit === "1") ? true : false;
$PAGE->requires->js_init_call('M.scorm_api.init', array($def, $cmiobj, $cmiint, $cmicommentsuser, $cmicommentslms,
scorm_debugging($scorm), $scorm->auto, $scorm->id, $CFG->wwwroot,
sesskey(), $scoid, $attempt, $mode, $id, $currentorg, $scorm->autocommit));