Forum Discussion
HelenBundock-d2
5 years agoCommunity Member
Using lmsAPI.GetScore();
Hi, We are creating a course that is in three parts, each part can be completed separately and only one part is to be attempted in the one year. On returning to the course we would like the course...
SamHill
5 years agoSuper Hero
Hi Helen,
If you are accessing the lmsAPI, shouldn't the first line be:
var lmsAPI = parent.lmsAPI;
Try outputting the values to the console.log to see if you are getting the expected values back. You view this by hitting F12 when the course loads.
var lmsAPI = parent;
console.log('-----------------> lmsAPI',lmsAPI);
var myScore = lmsAPI.GetScore();
console.log('-----------------> myScore',myScore);
BTW, you should be able to use this function call directly without using lmsAPI
var myScore = GetScore();