MDL-45726 SCORM: Correct check for forcenewattempt

This commit is contained in:
Ciaran Irvine
2014-05-30 09:49:18 +12:00
committed by Dan Marsden
parent 1132d30d1f
commit 49c4454cec
+1 -1
View File
@@ -1431,7 +1431,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';
}