Permalink
Browse files

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

…to MOODLE_24_STABLE
  • Loading branch information...
2 parents 8003618 + 54bc823 commit d070222f6963126a56406ab4222f03523ea88981 @danpoltawski danpoltawski committed Jan 31, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 mod/scorm/locallib.php
View
@@ -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) {

0 comments on commit d070222

Please sign in to comment.