Retrieve name variable from Cornerstone and display it in a Storyline course

Jul 20, 2015

Hi,

I am having trouble with retrieving a user's name from the LMS and inserting it into a Storyline 2 course.  I am using Cornerstone LMS and building courses in SCORM 1.2 (I would use SCORM 2004 but Cornerstone have issues with that...)

Below is the JS I've tried, any ideas?

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

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

I've got a variable in Storyline called newName and the JS triggers when the timeline starts, or failing that, when the user presses a button on screen.

9 Replies

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