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
Ah. The very first one posted was Flash only. However, HTML5 output supports the second one posted no problem. Has for awhile:)
Only works in Flash:
player.SetVar("sLearnerName", SCORM_GetStudentName());
Works in all:
var player = GetPlayer();
//might need to use lmsAPI=parent; on some LMS
var myName = lmsAPI.GetStudentName();
var array = myName.split(',');
var newName = array[1] + ' ' + array[0];
player.SetVar("newName", newName);
KyleMullaney
6 years agoCommunity Member
This is not working in HTML5 on Sakai. It does work in flash on Sakai.
- BrianAllen6 years agoCommunity Member
I'd be curious to know if Sakai exposes student name as part of it's API... Not sure if this is an industry standard, and not sure if Sakai adheres to those industry standards.