Permalink
Browse files

SCORM AICC MDL-2144 total_time accumulation calculated incorrectly. -…

… thanks to Matteo Scaramuccia for report and fix. merged from HEAD
  • Loading branch information...
1 parent cfb345a commit 6f51e02bab50f49e134d99cc789bb507b476b53b @danmarsden danmarsden committed Apr 30, 2010
Showing with 2 additions and 1 deletion.
  1. +2 −1 mod/scorm/aicc.php
View
@@ -331,7 +331,7 @@
case 'exitau':
if ($status == 'Running') {
if (isset($SESSION->scorm_session_time) && ($SESSION->scorm_session_time != '')) {
- if ($track = get_record_select('scorm_scoes_track',"userid='$USER->id' AND scormid='$scorm->id' AND scoid='$sco->id' AND element='cmi.core.total_time'")) {
+ if ($track = get_record_select('scorm_scoes_track',"userid='$USER->id' AND scormid='$scorm->id' AND scoid='$sco->id' AND attempt='$attempt' AND element='cmi.core.total_time'")) {
// Add session_time to total_time
$value = scorm_add_time($track->value, $SESSION->scorm_session_time);
$track->value = $value;
@@ -345,6 +345,7 @@
$track->scoid = $sco->id;
$track->element = 'cmi.core.total_time';
$track->value = $SESSION->scorm_session_time;
+ $track->attempt = $attempt;
$track->timemodified = time();
$id = insert_record('scorm_scoes_track',$track);
}

0 comments on commit 6f51e02

Please sign in to comment.