Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cce0da7
)
MDL-34231 SCORM: calculate correct number of attemptsleft when entering an attempt.
author
Dan Marsden
<dan@danmarsden.com>
Wed, 30 Jan 2013 21:45:11 +0000
(10:45 +1300)
committer
Dan Marsden
<dan@danmarsden.com>
Wed, 30 Jan 2013 21:45:11 +0000
(10:45 +1300)
mod/scorm/locallib.php
patch
|
blob
|
blame
|
history
diff --git
a/mod/scorm/locallib.php
b/mod/scorm/locallib.php
index
648c62b
..
2fb5dcd
100644
(file)
--- a/
mod/scorm/locallib.php
+++ b/
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) {