Moodle
  1. Moodle
  2. MDL-18857

Activity Report (Outline) for users does not list completed SCORM activities with score=0

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.9.4
    • Fix Version/s: 1.9.8
    • Component/s: SCORM
    • Labels:
      None
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE
    • Rank:
      31774

      Description

      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))

      { $attemptscore->lastmodify = $userdata->timemodified; }

      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; }

      .

        Issue Links

          Activity

          Hide
          Dan Marsden added a comment -

          any chance you could add a couple of screenshots so I can figure out exactly what pages you mean?

          thanks!

          Show
          Dan Marsden added a comment - any chance you could add a couple of screenshots so I can figure out exactly what pages you mean? thanks!
          Hide
          Lars Kobbe added a comment -

          Here you can see the complete report showing the first two SCORM activities to be completed. The first activity has a raw score of 0, the next a raw score of 13. On the outline report 1, the first completed SCORM activity is not listed with a date, which looks like it wasn't done yet. My suggestion is to show such completed SCORM acitivites the same way as SCORM actitivities with raw scores above 0, demonstrated in outline report 2.

          Show
          Lars Kobbe added a comment - Here you can see the complete report showing the first two SCORM activities to be completed. The first activity has a raw score of 0, the next a raw score of 13. On the outline report 1, the first completed SCORM activity is not listed with a date, which looks like it wasn't done yet. My suggestion is to show such completed SCORM acitivites the same way as SCORM actitivities with raw scores above 0, demonstrated in outline report 2.
          Hide
          Marcelo Oliveira added a comment -

          Hi, I have this issue with version 1.9.5 and I try to solve this with the solution posted above but not solve the problem. Any suggestions?

          Show
          Marcelo Oliveira added a comment - Hi, I have this issue with version 1.9.5 and I try to solve this with the solution posted above but not solve the problem. Any suggestions?
          Hide
          Dan Marsden added a comment -

          now fixed in 1.9Stable and HEAD - thanks for the report.

          Show
          Dan Marsden added a comment - now fixed in 1.9Stable and HEAD - thanks for the report.

            People

            • Votes:
              4 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: