I noticed that when viewing the Activity Report (Outline), some completed SCORM activities were not displayed (no timestamp was given). I compared them with the Activity Report (Complete) and found that the listed SCORM activities had a score above 0, the missing ones a score of 0. I checked the code at mod/scorm/locallib.php and found the relevant lines at 477 to 486:
if (!empty($userdata->score_raw)) {
$attemptscore->values++;
$attemptscore->sum += $userdata->score_raw;
$attemptscore->max = ($userdata->score_raw > $attemptscore->max)?$userdata->score_raw:$attemptscore->max;
if (isset($userdata->timemodified) && ($userdata->timemodified > $attemptscore->lastmodify))
else
{ $attemptscore->lastmodify = 0; }}
The variable $attemptscore->lastmodify will only be set if $userdata->score_raw is not empty. Some SCORM activities, however, can be completed without generating such score and thus will not be listed in outline mode of the Activity Report. My suggestion is to move the inner if-block outside of the first if-block as such:
if (!empty($userdata->score_raw))
{ $attemptscore->values++; $attemptscore->sum += $userdata->score_raw; $attemptscore->max = ($userdata->score_raw > $attemptscore->max)?$userdata->score_raw:$attemptscore->max; }if (isset($userdata->timemodified) && ($userdata->timemodified > $attemptscore->lastmodify))
{ $attemptscore->lastmodify = $userdata->timemodified; }else
{ $attemptscore->lastmodify = 0; }.