Picture of Ludovic Bas
Reset spoor location
by Ludovic Bas - Monday, 16 April 2018, 7:56 AM
 

Hello,

it seems that the LMS I'm using keeps the course to completed after completion (it should instead use a new attempt and start from the beginning right?).

So I would like to modify Adapt to reset the location (cmi.location) once the completion is done. Like this the learner will start from the beginning the next time he opens the course.

 

Thanks;

Picture of Matt Leathes
Re: Reset spoor location
by Matt Leathes - Tuesday, 17 April 2018, 5:38 PM
 
it should instead use a new attempt and start from the beginning right

That's something that varies depending on LMS and/or SCORM version

Moodle certainly offers the user a 'start new attempt' option prior to relaunching a course that has previously been completed. Most other Learning Management Systems I've seen don't seem to do this (in SCORM 1.2 anyway). The course might disappear from your list of 'active courses' but if you manage to get back to it and launch it you'll get all the same tracking data you had when you completed it.

In SCORM 2004, when the course is completed, the spoor plugin will set cmi.exit to "normal" which - according to the SCORM 2004 docs - means that "A subsequent learner attempt on the SCO will involve a new set of run-time data".

Note that resetting cmi.location will not reset the completion of contentObjects/articles/blocks/components within the course nor will it have any impact on the completion status. The only impact of resetting this would be that the user would not be given a prompt to return to the page/article/block/component they were on when they exited the course.

That said, if you did want to reset the location once the course is completed you would need to amend the bookmarking plugin to listen for the Adapt 'tracking:complete'* event - when that is triggered you would need clear the stored location and disable the bookmarking extension so that it doesn't attempt to keep tracking where the user is in the course for the remainder of the session.

Hope this helps

* note that this event is only available in Adapt v3.0.0 - in previous versions it was left up to the spoor plugin to decide when the course was completed, you'll find all the logic for that here.

Picture of Ludovic Bas
Re: Reset spoor location
by Ludovic Bas - Wednesday, 25 April 2018, 9:17 PM
 

Thank you for your answer. Sorry for the time to reply.

I've finally reseted location and suspend_data in ScormWrapper.prototype.setPassed = function() { in wrapper.js.

I've also modified ScormWrapper.prototype.setLessonLocation and ScormWrapper.prototype.setSuspendData that way:

 

if(this.scorm.data.completionStatus === "completed")
_data = "";

 

to be sure that bookmark will not be used anymore.