See how long each learner spent in a Moodle SCORM package

Moodle stores the time SCORM packages report but shows no per-learner total. Our free scormreport_timespent lists time per learner and SCO, with status.

Drawing of a stopwatch next to an open laptop showing a slide.

Short answer: Moodle keeps the time each SCORM package reports for every attempt, but none of its four SCORM reports shows how long each learner spent in total. People end up summing total_time with SQL (forum thread). Our free plugin, scormreport_timespent, adds a Time spent report: one row per learner, one column per SCO, the total, and the status of their last attempt.

This is the twenty-fifth plugin in our series: one plugin for each Moodle plugin type, each one teaching DevLMS Studio, our AI plugin builder, how that type works. The Moodle plugins directory lists two other SCORM reports (question trends and one for Numbas); neither shows time.

What it shows

  • Time per SCO: the total time the package reported, all attempts added up.
  • Status of the last attempt: passed, failed, completed, incomplete or browsed.
  • Total across SCOs, and the average of the learners who reported time.
  • Not started for learners who never opened the package, so compliance training gaps are visible at a glance.

Downloads (CSV, Excel, ODS and other enabled formats) give each time in seconds and as H:MM:SS, ready to add up. Groups are respected, and teachers’ own test runs are left out.

Teachers find it under the course Reports page as SCORM time spent. It supports Moodle 4.5 LTS to 5.3. The code is on GitHub.

One honest limit: the time is whatever the package sends. Some packages never report time; they show a dash, not zero. A session that ends abruptly (a laptop closed mid-lesson) may lose its time, which Articulate users have also seen.

How a SCORM report plugin works

From Moodle 5.3’s SCORM code:

  1. A SCORM report is a small plugin inside the SCORM activity. Moodle opens it from the activity’s report page and checks that the user may see reports.
  2. It reads the tracking data Moodle stores for each attempt: the status, the score and the time, in the formats of SCORM 1.2 (“00:40:00”) and SCORM 2004 (“PT40M”). Our report reads them in one database query instead of one per learner.
  3. A catch we found: the SCORM report menu lists only Moodle’s four own reports by name, so an added report never appears in it. That is why ours adds a link to the course Reports page and shows a menu with every installed report.

Browser tests open the report from the course Reports page, check a learner with two attempts (40 and 25 minutes: 1 hour 5 mins, Passed) and a learner who never started, and run an accessibility check. Unit tests cover both time formats, days, decimals, broken values and downloads.

Need a plugin like this for your own Moodle?

Describe it in DevLMS Studio and watch it built and tested in a real Moodle, or ask our team for a fixed price.

Open DevLMS Studio