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!