Getting null value of student name from LMS


I am getting null value when I am trying to fetch student name from lms in my certificate.html file using following code.

Plz can anyone help me to solve this issue?

var player = GetPlayer();

var myName = lmsAPI.GetStudentName();

var array = myName.split(',');

var newName = array[1] + ' ' + array[0];

var setName = player.SetVar("learner", myName);

Here, I am getting false in console.log

var getName = player.GetVar("learner");

Here, getting null value when I try to fetch.

5 Replies