Trying to import student name from LMS into a custom certificate.

I'm in need of assistance to import an employee name (user id) into a custom certificate launching from Oracle LMS. The JavaScript that is being used is partially functioning. The certificate launches, but the name is null (not imported). Any suggestions on what might be the problem? This JavaScript worked previously on a different course about a year ago but is not working now. I'm currently using Storyline - Articulate 360. Any troubleshooting help is appreciated. 

5 Replies
Christian Herman

Has there been an update to Oracle LMS since the last time script was used? Or a change in the way usernames are stored in the database? If so, the script may no longer look in the right place, or isn't set to pull the information correctly.

I wish I could help further, but you likely need someone who is familiar with both Javascript and the Oracle LMS.

OWEN HOLT

When this worked before, was it through a different version of StoryLine?  

With SL360's updates and with HTML5 publishing, some of the javascript must change because of the way(s) the SL360 player changed.

Here is the code I am using with the Learndot LMS and it pulls the name just fine.  You can compare your code against this.

var player = GetPlayer();

function findLMSAPI(win) {
// look in this window
if (win.hasOwnProperty("GetStudentID")) return win;

// all done if no parent
else if (win.parent == win) return null;

// climb up to parent window & look there
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("NewName", newName);