How to Display a Learner's Name on a Certificate

Jan 14, 2019

Hi Everyone,

Need some assistance here. I am using Storyline 360 to build a course to put into an LMS. No scoring will be needed. The course will be marked complete based on slides viewed. I have a certificate at the end of my course which will display the learner's name (pulled from the LMS) and the current date.

The slide/certificate reads something like this:

This is to confirm that:
%varLearnerName%
has completed a course on
%varCompleteDate%

I haven't been able to get the name to display. Date works though.

For the slide trigger, I have Execute JavaScript and:

var player = GetPlayer();
var myName = lmsAPI.GetStudentName();
var array = myName.split(',');
var newName = array[1] + ' ' + array[0];
player.SetVar("varLearnerName", newName);

And a variable created called varLearnerName which is set to text. Anyone know how to get the name to display? What am I doing wrong? I don't need any fancy scoring, nor requirements if it's based on passing or failing, I just need the learner's name to display on the slide. Any help is immensely appreciated.

2 Replies
Gai Tuz

Hi Craig, looks like Articulate does not have a specific support on this. But I managed to search for a work around which they seem to be recommending at this point. It's just actually modifying their Report HTML file used in the Quizmaker print results. You can customize it and make it look like a certificate which I think you can easily pull off.

Hope this helps!

 

Russell Killips

Hello Craig,

See if this code works for you. I have also attached a sample project that works in the SCORM Cloud.

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[1] + ' ' + array[0];
player.SetVar("varLearnerName", newName);

This discussion is closed. You can start a new discussion or contact Articulate Support.