Retrieving LMS username as a variable using Tin Can API

Thanks to the help of Phil Mayor on this post, I was able to retrieve my LMS username using SCORM 1.2 but couldn't get it to work using Tin Can.

I was using this JavaScript:

var player = GetPlayer();

var myName = lmsAPI.GetStudentName();

var array = myName.split(',');
var newName = array[0];

player.SetVar("newName", newName);

//myName = player.GetVar('myName');

//player.SetVar("newName", newName);

 

My question is: Is it possible to retrieve my LMS username using Tin Can?

4 Replies