Not able to set score to LMS
May 27, 2015
Hi Everyone,
i have created custom result slide as it is the requirement and i have to send score to the lms from my custom result slide, this is what i have tried to do
var correctQue=0;
var resultPercentage=0;
var player = GetPlayer();
var correctQue = player.GetVar("correctQue01");
resultPercentage=(correctQue/8)*100;
player.SetVar("result",resultPercentage);
var lmsAPI = parent;
lmsAPI.SetScore(Score,Result);
but its not working, any help will be appreciated.
5 Replies
Hi, Prashant -
Although we don't provide support for JavaScript coding, it may be helpful to take a look at this document on JavaScript Best Practices. Hopefully, some of our JS experts in the community can chime in with suggestions!
to my recollection setscore requires three arguments, the score, the maximum score and the minimum score.
also make sure your arguments are in agreement with variable names, looks like some inconsistencies there.
agree with patrick, there is code on e here for how to phrase correctly
Thanks Patrick and Phil for popping in here - it looks like a bit of an older thread and I'm not sure if Prashant is still subscribed, but if you know the code changes to make you're welcome to share here or send along to him using the "contact me" button on his profile.
This discussion is closed. You can start a new discussion or contact Articulate Support.