Forum Discussion
Send Custom variables to LMS
Hi Joe,
I put in a support case but as I am looking at JavaScript they sent me back to the community to try and find a solution. I have run a number of tests and modified my JavaScript I don't know how many times. It looks like my JavaScript is not connecting to the LMS. I have tried two different LMS' as well. My main focus is to get my learner's final score ('Percentage') recorded in the gradebook but nothing I do seems to work.
The code I am using is:
var player = GetPlayer();
lmsAPI.SetScore(player.GetVar("Percentage"), 100, 0)'
lmsAPI.CommitData();
The other JavaScript was to see if I could retrieve the learner's name using a button as the trigger but that didn't work either which leads me to think that for some reason my JavaScript is either not executing which could mean I have the trigger in the wrong place, or my code is wrong.
I am publishing as scorm 1.2 and the LMS is Moodle.
Hi Karen,
See if this works for you.
Related Content
- 6 months ago
- 6 months ago