How to capture score in LMS through custom variable in storyline

Nov 10, 2020

Hello Storyline community,
I am unable to track my custom score on LMS. Need your help.
I have created a quiz course in storyline 360, with a custom score variable - "TotalScore". I published it in SCORM 2004 version edition 3. I tried tracking the score through javascript, it did not work. I would appreciate any help on how to track the storyline file score variable on LMS. My maximum score is 300, is that a problem?

4 Replies
Vincent Scoma

Hi Shilpi,

Happy to help! 

While I'm not sure about the course's current setup, there are a couple of ways to pass a variable to the LMS. This is one method to report variables to your LMS here:

Another idea was from the community using JavaScript. You can find more details about that workflow here: 

Please let us know if you have any questions! We are happy to help! 

Venkatesh Acharya

Hi Vincent,

I tried 2 option

//***this will grab a score variable and check that value against a passing score
var player=GetPlayer();
var cScore=player.GetVar("OverallPercentage");
var ScoreLMS=cScore.toFixed(2);
if(ScoreLMS>75){
SetStatus("completed");
}
lmsAPI.SetScore(ScoreLMS, 100, 0);

and it worked partially, I mean when I got 50% score then it registered to LMS but in the second attempt when I got 80% it didn't register it and even the success status remained failed?

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