You are here

How to set cmi.core.lesson_status to completed in Captivate 5.5

1 post / 0 new
Dan Richards
How to set cmi.core.lesson_status to completed in Captivate 5.5

Captivate 5.5 has two built-in options to set the completion criteria for a course. A student can complete a course by getting a passing score (the Quiz Results Only setting) or by visiting a specified percentage of the slides in the course (the Slide Views Only setting). You can also combine these two criteria so a user has to visit a percentage of slides and get a passing score to complete the course.

Here is another way. I recently built a working example that had a button on the last slide. for the On Success action of the button I chose and enetered the following JavaScript into the script window:

var retval = g_objAPI.LMSSetValue('cmi.core.lesson_status', 'completed');
var retval = g_objAPI.LMSCommit('');
var retval = g_objAPI.LMSFinish('');

I labeled the button "Complete and Close" because that's exactly what it does. When it is clicked, the code on this button sets the cmi.core.lesson_status to completed, executes an LMSCommit to make sure the value is pushed to the server where it will persist, and then it calls an LMSFinish to close the communication between the cotent and the LMS. This also seems to have the affect of closing the course, at least in the SCORM Cloud where this was tested.

Incidentally, I did have to choose one of the default completion cirteria settings I mentioned earlier, so I chose the Slide Views Only setting with 100% as the percentage. With this setting it is important to be aware that Captivate will eveluate whether the required percentage of slides were visited every time a new slide is accessed. I found that I could not put my code on the actions of the last slide since Captivate executes the slide actions and then eveluates the percentage of visited slides immeditely after that - which has the affect of setting cmi.core.lesson_status to incomplete. That's why I put the code on a button.

To improve on this functionality, one might look into a delay of some sort that allows Captivate to evaluate the percentage of visited slides and then execute the JavaScript applied to the last slide. And, perhaps one could leave off the LMSFinish and allow the user to close the course by clicking an Exit button - as long as the user can't navigate to other slides.

Anyway, i hope that someone will find this to be a plausible alternative to Captivate's current course completion routine.