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.
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.
Do you get any errors in the console? Can you display the name in the course? How are you generating your certificate? pdfMake never seems to be able to pull variables changed on the slide so you may need change where you pull the LMS name
5 Replies
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.
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);
Hmm that code doesn't seem to work at all. Can you provide an example in storyline? Maybe I'm missing something?
Do you get any errors in the console? Can you display the name in the course? How are you generating your certificate? pdfMake never seems to be able to pull variables changed on the slide so you may need change where you pull the LMS name
What LMS are you using? Have you tested in Scorm Cloud?
This discussion is closed. You can start a new discussion or contact Articulate Support.