Forum Discussion
SallyMilford
8 years agoCommunity Member
Pulling first name from LMS
Hi all - I'm wondering if anyone might be able to put together a step-by-step guide as to how to set up a variable / javascript function for this? (i.e. pulling a user's first name from the LMS).
...
ilanaDubovi
8 years agoCommunity Member
Hi all,
I've read through this discussion.
Can you please help me to set up an execute javascript for transmitting score from HTML5 to moodle.
I've been using for Flash the following code, but seems that is not working with HTML5 publishing only:
/*Get player to reference*/
var player = GetPlayer();
/*get LMS API*/
var lmsAPI = parent;
/*set score; the first number is the score*/
lmsAPI.SetScore(player.GetVar("zScores"), 100, 0);
/*set status; possible values: "completed","incomplete", "failed", "passed"*/
With thanks,
Ilana