Getting from LMS cmi.learner_name as variable

Hello everybody,

I read every single message in this thread  ( , and in some others ( (

But couldn't find what I am looking for :

My client LMS (Talentsoft) in SCORM 2004, can display cmi.learner_name as a variable.

I tried many many many syntaxes to grab this data, but I guess the only working one wasn't in my scope !

Can anymone help me ? what is the syntax to grab this value ?

thank you for the help


1 Reply
phil Mek

Hello again,

Matthew Bibby gave me the answer. It works perfectly in Talensoft LMS.

Be aware that  I only needed the firstname.

Here is his code to close this thread.


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 name = lmsAPI.SCORM2004_GetStudentName();
var nameArray = name.split(',');
var firstName = nameArray[1];
// var lastName = nameArray[0];
// var fullName = firstName + ' ' + lastName;
var player = GetPlayer();