Picture of Rob Mausser
Auto complete button?
by Rob Mausser - Tuesday, 2 May 2023, 8:00 PM
 

Hi there

Due to a clients issue with their LMS, we need a button at the end of the course that when someone presses it, it will pass completion to the LMS regardless of whether the course is completed.

I see in the DevTools such a button exists, with "Complete Menu"

I basically need this button in the course.

Is there anyway to have some kind of onclick event on a button that sends completion to the LMS?

Something like

<button onclick="adapt.course.set("_isComplete", true);"> </button>

Thanks!

Picture of Oliver Foster
Re: Auto complete button?
by Oliver Foster - Tuesday, 2 May 2023, 9:02 PM
 

the way to get the adapt object is require('core/js/adapt').course.set('_isComplete', true)

Picture of Rob Mausser
Re: Auto complete button?
by Rob Mausser - Tuesday, 2 May 2023, 9:50 PM
 

Works! Thanks!

Picture of Rob Mausser
Re: Auto complete button?
by Rob Mausser - Monday, 29 January 2024, 10:22 PM
 

We are having some unfortunate but rare situations with our LMS where Adapt "course._isComplete" is set to True, but the LMS never records the lesson_status to completed. 

The problem then is you can never set the lesson_status because the course is already complete! 

Is there a way to use a similar button to set Lesson_Status to Completed directly? Rather than setting course._isComplete: true

something like:

SCORM.data.set('cmi.core.lesson_status', 'completed');

Thanks

 

 

Picture of Oliver Foster
Re: Auto complete button?
by Oliver Foster - Tuesday, 30 January 2024, 9:32 AM