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 Philip -
If the LMS changed something, it could require a slight shift. Add the bolded line below to see if something changes.
var player = GetPlayer();
lmsAPI=parent;
var myName = lmsAPI.GetStudentName();
var array = myName.split(',');
var newName = array[1] + ' ' + array[0];
player.SetVar("newName", newName);
PhilipLima1
10 years agoCommunity Member
Hi Steve. Thanks for the suggestion, but that didn't fix it.