projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bf11293
)
MDL-21096 - fixed inconsistency in mod/scorm attempts counting. Also added in except...
author
Piers Harding
<piers@ompka.net>
Wed, 13 Jan 2010 20:47:12 +0000
(20:47 +0000)
committer
Piers Harding
<piers@ompka.net>
Wed, 13 Jan 2010 20:47:12 +0000
(20:47 +0000)
mod/scorm/datamodels/scorm_12lib.php
patch
|
blob
|
history
diff --git
a/mod/scorm/datamodels/scorm_12lib.php
b/mod/scorm/datamodels/scorm_12lib.php
index aa909e7b8cafd56927f9dd92dce298843ae3e8e6..709bec570fddfbaebec481695cef4092b69cf939 100644
(file)
--- a/
mod/scorm/datamodels/scorm_12lib.php
+++ b/
mod/scorm/datamodels/scorm_12lib.php
@@
-134,9
+134,9
@@
function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
// If not specified retrieve the last attempt number
//
if (empty($attempt)) {
- $attempt = scorm_get_
last_attempt($scorm->id, $user->id
);
+ $attempt = scorm_get_
attempt_count($user, $scorm
);
}
- $result->attemptleft = $scorm->maxattempt - $attempt;
+ $result->attemptleft = $scorm->maxattempt
== 0 ? 1 : $scorm->maxattempt
- $attempt;
$conditions['scorm'] = $scorm->id;
if ($scoes = scorm_get_scoes($scorm->id, $currentorg)){
//