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
12 years agoCommunity Member
Hi, Vince -
You can try a couple of things to troubleshoot the issue.
1)
alert(lmsAPI.GetStudentName());
If your student name returns in the alert, the method is working and there's another problem. If it doesn't, try this:
2)
var lmsAPI = parent;
alert(lmsAPI.GetStudentName());
It could be that your LMSAPI is nested in a parent. This jacks up the reference. If #2 returns your student name, let us know and we'll recommend a change to the original script.