Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

…ucture or direct navigation to player.php
  • Loading branch information...
commit 9de3aac74892c53020fb7e27156bec29019ac57b 1 parent 9130843
Dan Marsden danmarsden authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 mod/scorm/player.php
6 mod/scorm/player.php
View
@@ -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';
Please sign in to comment.
Something went wrong with that request. Please try again.