Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'm24_MDL-34231' of git://github.com/danmarsden/moodle in…

…to MOODLE_24_STABLE
  • Loading branch information...
commit d070222f6963126a56406ab4222f03523ea88981 2 parents 8003618 + 54bc823
@danpoltawski danpoltawski authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  mod/scorm/locallib.php
View
3  mod/scorm/locallib.php
@@ -1580,7 +1580,8 @@ function scorm_format_toc_for_treeview($user, $scorm, $scoes, $usertracks, $cmid
$result->incomplete = true;
if (!$children) {
- $result->attemptleft = $scorm->maxattempt == 0 ? 1 : $scorm->maxattempt - $attempt;
+ $attemptsmade = scorm_get_attempt_count($user->id, $scorm);
+ $result->attemptleft = $scorm->maxattempt == 0 ? 1 : $scorm->maxattempt - $attemptsmade;
}
if (!$children) {
Please sign in to comment.
Something went wrong with that request. Please try again.