MDL-34231 SCORM: Lock after final attempt when using skip content structure or direct navigation to player.php

This commit is contained in:
Dan Marsden
2013-01-28 21:17:43 +13:00
parent b3778a0dec
commit cce0da745a
+6
View File
@@ -135,6 +135,12 @@ $attemptstr = '&attempt=' . $attempt;
$result = scorm_get_toc($USER, $scorm, $cm->id, TOCJSLINK, $currentorg, $scoid, $mode, $attempt, true, true);
$sco = $result->sco;
if ($scorm->lastattemptlock == 1 && $result->attemptleft == 0) {
echo $OUTPUT->header();
echo $OUTPUT->notification(get_string('exceededmaxattempts', 'scorm'));
echo $OUTPUT->footer();
exit;
}
if (($mode == 'browse') && ($scorm->hidebrowse == 1)) {
$mode = 'normal';