Storyline 360 - Using JavaScript to set course completion status not working?

I've been using this bit of JS code at the end of all my courses to mark it complete without a score by attaching it to a button:

//get LMS API

var lmsAPI = parent;

//set score; the first number is the score

lmsAPI.SetScore("", "", "");

//set status; possible values: "completed","incomplete", "failed", "passed"



It's been working fine up until recently. After the button with JS code is clicked, it now says "in progress" instead of "completed". Nothing has changed except for the fact that I recently upgraded to Storyline 360. Anyone else experience issues with this code in SL360?

12 Replies
Megan Creegan

I really appreciate that!

Curious to get your opinion. Since my JS code is rather simple (I just want the course marked as complete without returning a score), is there any particular reason I would continue to use JavaScript versus attaching a trigger to the button that submits the results. On my results slide I do not have any of the questions selected and the score is set to 0.

It appears to work when I test in our LMS (Saba), but I'm just one user. Wondering if there's a value in continuing to use JavaScript (I don't remember why we didn't use the submit results in the first place).

Curtis Wiens

So am I right in saying that when publishing for HTML5 only using JS to mark a course complete with SetStatus("completed") will not work? It appears to only work when publishing for HTML5 and Flash. I do not have this option as the course needs to be mobile friendly. I have courses with no quizes that need to be marked complete in the LMS when you get to a specific slide. 

Megan Creegan

Glad it's working Curtis. I don't have quizzes in most of my courses, but I like to set a button to trigger to mark complete on submit quiz. It seems to be more reliable than using JavaScript. All I do is add a new scene and a "review quiz" slide to that scene. No one ever sees it, but it allows you to use a button to mark the course complete using the quiz option.