Forum Discussion
AndrewRost
13 years agoCommunity Member
Retrieve LMS User Name as Variable
I know you can have a user fill in a text box with their name and then later use that variable for personalization. What we would like to do is programmatically retrieve the user name from the LMS....
SteveFlowers
Community Member
Hi, James - Which code are you using? This works for me in HTML5 publish.
var player=GetPlayer();
lmsAPI=parent;
var username=lmsAPI.GetStudentName();
player.SetVar("SLVariable",username);
//alert(username);
ChrisPim-7dc640
8 years agoCommunity Member
Any resolution to this I can't get this working in 360 HTML5 output in any browser
-------------------
var player=GetPlayer();
lmsAPI=parent;
var username=lmsAPI.GetStudentName();
player.SetVar("SLVariable",username);
//alert(username);
----------------------
Anyone got this working?