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"
SetStatus("completed")
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?
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).
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.
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.
Okay thanks. So although I am getting course complete using the JS call I should not rely on it? It seems to be working consistently on our LMS (cornerstone). Iam trying to minimize additional work as this project is due this week. :)
It should still work using JS. I only decided to use the quiz submit because it returned the same reporting result and worked consistently for me. I'm a little wary about using JavaScript triggers if I don't have to since I'm not confident how things work with HTML5 output.
11 Replies
Hmmm... I'm publishing with HTML5 with flash fallback. Does HTML5 not work with JS?
Thank you Matthew! This is incredibly helpful!
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).
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.
Update on this. It is actually working for some odd reason our LMS has a lag today.
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.
Okay thanks. So although I am getting course complete using the JS call I should not rely on it? It seems to be working consistently on our LMS (cornerstone). Iam trying to minimize additional work as this project is due this week. :)
It should still work using JS. I only decided to use the quiz submit because it returned the same reporting result and worked consistently for me. I'm a little wary about using JavaScript triggers if I don't have to since I'm not confident how things work with HTML5 output.
Gotcha. Thanks for the heads up!
I am currently encountering the same issue again. Could anyone help me get some codes to set the system status "complete" without the score ?
The
SetStatus("passed"); // Applied when a score is set.
JavaScript line should theoretically work.
There are other parameters as well...
SetStatus("completed");
This discussion is closed. You can start a new discussion or contact Articulate Support.