I have used the custom score variable and wanted to set LMS status as complete on the basis of the user score. However, the completion status is being determined based on slides viewed. For example, If I have scored below 75% and attempted all the questions, the LMS status should be incomplete and failed, but it is reflecting as complete.
I have used following js code on the last screen:
var player=GetPlayer(); var cScore=player.GetVar("FinalScore");
var lmsAPI = parent; lmsAPI.SetScore(cScore, 100, 0);
if (cScore>=75) { SetStatus("completed"); } else { SetStatus("incomplete"); }
Please help me to sort out this problem ASAP as an important project delivery of mine depends on this.
IF you track by results slide it will always overwrite the score, to be fair I havent checked your javascript, but it is better to track by slides viewed and make sure the user cannot meet the slide total
Yes, I have tested it on ScormCloud and JavaScript is working because my score is reflecting on the LMS and I have put a alert message at the end of java Script and its working. Only problem is that Status is not going to update on the LMS.
If the javascript is setting the score then the package is overwriting the status you have to have the tracking set so they can never achieve complete.
14 Replies
How are you tracking when you publish?
Have you ensured that Storyline cannot send a complete which will always overwrite any javascript.
I am tricking it with the result slide.
IF you track by results slide it will always overwrite the score, to be fair I havent checked your javascript, but it is better to track by slides viewed and make sure the user cannot meet the slide total
I have also tracked it by slide viewed but in that case status goes completed while I had scored below passing score.
You need to ensure they cannot complete the course via the way you are tracking.
Add in a slide they cannot reach and track by 100% of slides
I had tried that scenario as well, in that case if I have scored above passing score then status goes incomplete to the LMS.
Sounds to me like your javascript is not working, have you tested in Scormcloud?
Yes, I have tested it on ScormCloud and JavaScript is working because my score is reflecting on the LMS and I have put a alert message at the end of java Script and its working. Only problem is that Status is not going to update on the LMS.
If the javascript is setting the score then the package is overwriting the status you have to have the tracking set so they can never achieve complete.
I have used following JS code please check if there is any problem in this:
var player=GetPlayer();
var cScore=player.GetVar("FinalScore");
var lmsAPI = parent;
lmsAPI.SetScore(cScore, 100, 0);
if (cScore>=75)
{
SetStatus("completed");
}
else
{
SetStatus("incomplete");
}
javascript looks fine and if it works in scormcloud it is the storyline file overwriting
whats the solution now?
Matt Kurtin says -
Last line needs to me modified if using Storyline 3.10 (and likely in later versions too) becasue SetStatus is no longer defined.
var lmsAPI = parent;
lmsAPI.SetScore(100, 100, 0);
lmsAPI.SetPassed();
See link:https://community.articulate.com/discussions/articulate-storyline/storyline-set-lms-status-with-javascript?page=3
Hi Matt.
Thanks alot! for your support.
Regards,
Shailendra
This discussion is closed. You can start a new discussion or contact Articulate Support.