Skip to content
Browse files

MDL-34231 SCORM: Lock after final attempt when using skip content str…

…ucture or direct navigation to player.php
  • Loading branch information...
1 parent b3778a0 commit cce0da745a8dba10cb554be917b1df48dd0eec68 @danmarsden danmarsden committed Jan 28, 2013
Showing with 6 additions and 0 deletions.
  1. +6 −0 mod/scorm/player.php
View
6 mod/scorm/player.php
@@ -135,6 +135,12 @@
$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';

0 comments on commit cce0da7

Please sign in to comment.
Something went wrong with that request. Please try again.