How to detect or count a course launch or resume ?

May 01, 2018

Hi heroes,

I wish to count the number of times a course has been launched.

Can we use a trigger on course lauch or resume ?

I'm thinking of using the Always Resume player setting.

Any JavaScript to help us here ?

Learners can exit the course the way they wish. Can we increment a variable on any exit event ?

Thanks a lot :)

Phil

 

15 Replies
Philip Siwinski

Thanks Matthew, I found a solution capturing current date/time in JavaScript. Still need more testing.

There is no difference of time (in seconds) between a trigger to jump to a slide and the timeline start of that slide. However, when the course is resumed, even quickly after closing it, there is a difference of at least a second. That's how I know the course has been resumed.

There might be a more elegant way of detecting when a course is resumed 🤔

Stephanie Powner

I would find an 'on resume' trigger option useful.  I plan to have a course progress layer and i would like this to be shown when the learner re-launches the course.  I plan to use the 'Resume' functionality where the user goes back to the slide they reached previously but i'd also like to give them the option of returning to the start of that module. 

Crystal Horn

Hey there, Stephanie.  Thanks for sharing your thoughts!

Could you have a "home" or "restart module" button/icon on each slide?  Or to take it a step further, you could have an "exit slide" that displays when they click to exit the course, and you could keep the progress information there.  When they resume, they see the exit slide again with the options to return to the last slide, restart the module or exit the course.

Just some ideas to help get you closer to what you want!

Stephanie Powner

Hi Crystal

Sorry for the delay in getting back to you.  Thanks so much for the advice.  I had thought of setting a variable on exit and having a trigger on the master to show the 'home view' when the slide timeline starts is the variable is set (then un-setting it til the next exit).  The problem I saw with this was that the forums suggest that on-exit trigger behaviour might not be reliable particularly in some browsers.  Therefore do you think using 'on-exit' in this way could cause problems.  As this will be key to the learners navigating through the course, I need it to be consistent, if it then it will be the answer to what I wanted to do.  I appreciate your help!  

Crystal Horn

Hi there, Stephanie.  Thanks for following up!  While it's true that the Exit course trigger might not function reliably based on a few factors, any other trigger on a button should be fine.  If the Exit course trigger doesn't close the browser, closing the browser window would have the same impact on resume behavior.

Keep us posted on what you decide to do!

Math Notermans

As im building a custom resume page ( as the default is dreadfull ) im wondering if this might work...

Set the course to "Reset to Initial State"
Thus forcing a user on a resumed attempt to go to the first slide.
On that first slide build a slideLayer with the custom resume functionality...
If a user quits and restarts check if 'suspend_data' has any data... if so... the user has tried it before and thus gets the resume slideLayer.

From there he then can choose restart or resume and on resume he will be directed to the last visited page.

Why im doing this ? As we use custom code we need to ensure that that code is available as a user resumes.  Thus we have to copy that code onto each page of a course or add it to a Slide Master. Both setups i dont like... thus experimenting with a custom resume setup.

Patrick Geiger
Math Notermans

As im building a custom resume page ( as the default is dreadfull ) im wondering if this might work...

Set the course to "Reset to Initial State"
Thus forcing a user on a resumed attempt to go to the first slide.
On that first slide build a slideLayer with the custom resume functionality...
If a user quits and restarts check if 'suspend_data' has any data... if so... the user has tried it before and thus gets the resume slideLayer.

From there he then can choose restart or resume and on resume he will be directed to the last visited page.

Why im doing this ? As we use custom code we need to ensure that that code is available as a user resumes.  Thus we have to copy that code onto each page of a course or add it to a Slide Master. Both setups i dont like... thus experimenting with a custom resume setup.

  • Math Notermans - Any luck on this? I was thinking of attempting to do the same thing. In my case, we're using SCORM 2004, so I started inspecting the scormdriver.js and it looks like there is a method to get the suspend_data value (SCORM2004_GetDataChunk()). Do you know if that is right (I don't have direct access to the LMS so it is difficult for me to test)? If so, what does it return in the case of a not resumed session? Null value?

 

Thanks so much!