in JavaScript how to control Success and Completion in LMS

Jun 26, 2019

/*get LMS API*/
var lmsAPI = parent;
/*set score; the first number is the score. The second is the max score and third min score*/
lmsAPI.SetScore(0, 100, 0);
/*set status; possible values: "completed", "incomplete", "failed", "passed"*/
SetStatus("completed");

in JavaScript how to control Success and Completion in LMS becoz Score java working fine but SetStatus not working.

2 Replies
BENOIT GUILLO

Hello,

I have experienced your solution James Hogg and it works fine within ScormCloud but not on my client LMS (Talentsoft). Talentsoft Technicians modified the setStatus process in order to make it compliant with their LMS engine. In the end everything worked.

I have to precise that my client tasked me to create one storyline for 2 languages and be able to send completion and success to his LMS platform. I added a javascript trigger at the end of each chapter in order to send 25% of completion :

1st chapter :

lmsAPI=parent;
lmsAPI.SetScore(25,100,0);
SetStatus("incomplete");

2nd chapter :

lmsAPI=parent;
lmsAPI.SetScore(50,100,0);
SetStatus("incomplete");

3rd chapter :

lmsAPI=parent;
lmsAPI.SetScore(75,100,0);
SetStatus("incomplete");

4th chapter :

lmsAPI=parent;
lmsAPI.SetScore(100,100,0);
SetStatus("complete");
lmsAPI.SetPassed();
LMSCommit();

If the learner is able to read any of the 4 chapters, you should add a progress variable (Storyline %chapterRead% number) have to create 4 javascript triggers at the end of each chapter (if this chapter has been read 1st, then play javascript trigger : lmsAPI.SetScore(25,100,0);), etc.

4_LMS_js_Triggers

Thank you James and  Harsh for your experiences !

This discussion is closed. You can start a new discussion or contact Articulate Support.