While I was testing the forcecomplete setting and debuggin, I saw an issue the[ locallib.php|https://github.com/moodle/moodle/blob/main/mod/scorm/locallib.php#L476] of the scorm Module.
$tracktest = scorm_get_sco_value($scoid, $userid, 'cmi.core.lesson_status', $attempt->attempt); |
if (!empty($tracktest)) { |
if ($tracktest->value == "incomplete") { |
$v = new stdClass(); |
$v->id = $track->valueid;
|
$v->value = "completed"; |
$DB->update_record('scorm_scoes_value', $v); |
}
|
The variable $track is undefined, leading to an exception.