Get LMS score into JS file in Articulate 3

Hi,

I am using AS3 and I want to get achieved score in last session and the again reset that score as requirements. My code is:

var player=GetPlayer();
function findLMSAPI(win) {
if (win.hasOwnProperty("GetStudentID")) return win;
else if (win.parent == win) return null;
else return findLMSAPI(win.parent);
}

var lmsAPI = findLMSAPI(this);
alert("LMS SCORE: "+lmsAPI.GetScore());

BUT when I run this published version on LMS then alert is not showing. Can anyone help me out?

4 Replies
Ashley Terwilliger

Hi Amit,

What LMS are you using, and can you share more about the alert that displays? That info would definitely help some of our Javascript experts in the community offer advice and next steps. 

It's a bit outside my realm of expertise, but one suggestion for LMS behaviors is to look at testing in another environment. SCORM Cloud is a great option for that, and it's free which makes it even better! 

Amit Goyal

Thanks Ashley. Actually I was created three custom question banks and at a time only one bank will appear. And every time bank will be shuffle. But I was facing challenge to store maximum score achieved by user on LMS because I was using 3 result screens.

But now this is working by including javascript code on trigger.