Custom Time Tracking (SCORM 1.2 and SCORM 2004)

Mar 06, 2015

Hi,

We discovered that the courses we develop with Storyline keeps tracking the time spent in the course when a person is inactive. We report on the time people spend in courses, so we had to override how Storyline tracks time by default.

The way we're now tracking time is that if a person is on a slide for longer than 5 minutes, the course stops tracking time. Once the person goes back into the course and starts navigating, the course resumes time-tracking.

If you want to do something similar in your courses/projects, read on...

If you're publishing for SCORM 1.2, you need to modify the SCORMFunctions.js file in the lms subfolder. If you're publishing for SCORM 2004, you need to modify the SCORM2004Functions.js file in the lms subfolder. 

EDITS to the javascript (.js) file

I added this code that counts the time, and stops after a 5 minute interval:

var _time = 0;

var _timeReset = 300000; // Reset timer after 5 minutes

var _timeCountDown = _timeReset;

var _p; // Declare object where Articulate variables are stored

function _counter() {

    if (_timeCountDown != 0) { _time = _time + 1000; _timeCountDown = _timeCountDown - 1000; }

    setTimeout("_counter()", 1000); //execute again in 1 second

}

_counter();

The course bookmarks information at every slide using the SetValue function. So when the course calls the SetValue function to bookmark information, the course resets the 5 minute interval:

function SCORM2004_CallSetValue(strElement, strValue) {

    // Mauro: resume time-tracking

    if (strElement == "cmi.suspend_data") { _timeCountDown = _timeReset; }

I attached the files in case you want to reuse in your projects.

Note: I published with Storyline 1, Update 8 1412.921

Cheers,

Mauro

2 Replies

This discussion is closed. You can start a new discussion or contact Articulate Support.