Forum Discussion
AllisonZnachko-
8 years agoCommunity Member
Getting User Name from LMS into Storyline
I am working in Storyline 360 and creating a "certificate" with the User's Name and the date - both being pulled from our LMS. I am unable to get the Username to work. We are publishing to HTML 5- i...
rexmor
8 years agoCommunity Member
Hi,
Try this Javascript.
Add a trigger to execute Javascript inside Storyline
var player = GetPlayer();
function findLMSAPI(win) {
if (win.hasOwnProperty("GetStudentID")) return win;
else if (win.parent == win) return null;
else return findLMSAPI(win.parent);
}
var lmsAPI = findLMSAPI(this);
var myName = lmsAPI.GetStudentName();
var array = myName.split(',');
var newName = array[0]; // you can also try array[1]
player.SetVar("VariableName", newName); // VariableName is your Storyline Variable
Related Content
- 10 months ago
- 11 months ago