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.
- KarenLumley-ffb3 years agoCommunity Member
Hey Russell,
thanks so much for this. That worked. I can't say how happy I am
because this has been plaguing me for a couple of weeks now. Thanks again.*Thanks Karen*
Karen Lumley
IIT Training Pty Limited
[M] +61 498 728 181
[E] karen@iit-training.com
[W] www.iit-training.comISO9001:2015 Quality Endorsed
Registered Training Organisation, 90998-----------------------------------------------------------------------------------------------------------------
IMPORTANT NOTICE - THE FINE PRINTThe information contained in this email and attachments (if any) is
intended only for the person or entity to which
it is addressed. The message may contain confidential and/or privileged
material. You should only disclose,
re-transmit, copy, distribute, act in reliance on or commercialise the
information if you are authorised to do so.If you have received this in error, please contact the sender and delete
this email and associated material from any
computer. The IIT Training Group of companies does not represent, warrant
or guarantee that the integrity of this
communication has been maintained, nor that the communication is free of
errors, virus or interference.------------------------------------------------------------------------------------------------------------------