Forum Discussion
How to access xAPI/Tin Can LMS variables in JavaScript
Thanks for the info! I actually figured out that I could get the actor info from the querystring and parsed it all together, however, I'd still like to be able to interact with the LMS variables not available in the querystring, such as the completion status and score. Is there no way to do this in Storyline 360 if you're using Tin Can?
- rosycolelli7 years agoCommunity Member
Hello, I need to pass my score to LMS. I have to publish the course as Tincan. I tried the below Java but doesn't work.... LMS shows Score unknown
var player = GetPlayer(); var passingScore = "75"; 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); lmsAPI.SetScore(player.GetVar("Score"), 75, 0); if (player.GetVar("Score")>= passingScore) { SetStatus("passed"); } else { SetStatus("failed"); }
Could you help me, please?