We're using cck_scorm on a site that is for online learning. Right on the home page, we have a Drupal 'view' that is rendering a list of the available courses, with the SCOs rendered as "SCORM embedded" format in the view's definition.
Every time someone loads the homepage, they are recorded as having begun a new "attempt" at every single one of the courses, just by having looked at the homepage.
The trouble is, the "Click here to open Popup" link that is generated seems to require the SCORM API to load in the background in this host page. This uses a call to scorm_getAPIFilename(). At the very end of that function, there is a call to:
scorm_insert_track($scorm->id, $scoid, $attempt, 'x.start.time', time());
And what that means, is that every time a user views that course-listing page, an "x.start.time" record is inserted into scorm_scoes_track for every course that is listed.
For us, besides causing unnecessary clutter in the scorm_scoes_track table, it is making it more complicated to figure out what courses a user has actually attempted.
Is there any reason why we can't get scorm_loadsco() to insert the x.start.time record? That way, the start time will be recorded as when the SCO actually started loading, not when the user first saw the link to the SCO. It makes more sense to me anyhow... you want to record someone as having started the SCO when the SCO is *loading*, not when you are looking up the API filename.
Comments
Comment #1
dan3h commentedIt looks like the
x.start.timerecord is not just being used to record the start time, but also to record an instance of a new "attempt" number. This doesn't necessarily represent a user starting an attempt, but I think is necessary for the API (which is loaded at this time) to have a reference to this attempt number.So maybe rather than "x.start.time" being recorded by
scorm_getAPIFilename(), perhaps that function should record something like "x.standingby.time", and then inscorm_loadsco(), the attempt number can be looked up via a SQL query for "max(attempt)" (which seems to be used frequently throughout the cck_scorm code), and then at *that* point insert an "x.start.time" record of the same name.Some sort of cleanup code could be written to clean up all the orphaned x.start.time records.
Comment #2
pgerling commented"x.start.time" is not recorded in
scorm_getAPIFilename(), because this function is never used.But - you are right its used in scorm_loadapi. We moved it into scorm_loadsco, maybe this can fix your issue?
/Philipp
Comment #3
pgerling commentedNo reaction since 14 days, the issue seems to be resolved.