MDL-45726 SCORM: Correct check for forcenewattempt

This commit is contained in:
Ciaran Irvine 2014-05-29 18:54:36 +12:00 committed by Dan Marsden
parent 8e478c99d3
commit 005141f3d0

View File

@ -1445,7 +1445,7 @@ function scorm_check_mode($scorm, &$newattempt, &$attempt, $userid, &$mode) {
if ($incomplete === true) {
// The option to start a new attempt should never have been presented. Force false.
$newattempt = 'off';
} else if (($attempt !== '1') && !empty($scorm->forcenewattempt)) {
} else if (!empty($scorm->forcenewattempt)) {
// A new attempt should be forced for already completed attempts.
$newattempt = 'on';
}