It is possible. I did this a few years back with Saba. Here's the Javascript I used to pull the username. Note that the name comes Last Name, First Name so my script puts the name in an array so we can switch it to First Name Last Name. I used username as my variable name.
//grab the LMS object var lmsAPI = parent;
//ask the LMS object to get the name var rawName = lmsAPI.GetStudentName();
//the name comes very formal "Last, First" //we will fix that by sticking the name into an array var nameArray = rawName.split(",");
//then we save it the other way round "First Last" var niceName = nameArray[1] +" "+ nameArray[0];
//now we grab the Articulate player var p = GetPlayer();
//finally we set our Articulate var to our username p.SetVar("username",niceName);
Hi Dave - Articulate Storyline supports JavaScript triggers, letting you extend the functionality of your courses. I cannot offer support for JavaScript and I know we do not support the execution of JavaScript in Articulate Mobile Player as you can see here.
9 Replies
Hi Mark! JavaScript is not my specialty, but perhaps this thread will be able to assist you.
It is possible. I did this a few years back with Saba. Here's the Javascript I used to pull the username. Note that the name comes Last Name, First Name so my script puts the name in an array so we can switch it to First Name Last Name. I used username as my variable name.
//grab the LMS object
var lmsAPI = parent;
//ask the LMS object to get the name
var rawName = lmsAPI.GetStudentName();
//the name comes very formal "Last, First"
//we will fix that by sticking the name into an array
var nameArray = rawName.split(",");
//then we save it the other way round "First Last"
var niceName = nameArray[1] +" "+ nameArray[0];
//now we grab the Articulate player
var p = GetPlayer();
//finally we set our Articulate var to our username
p.SetVar("username",niceName);
Thanks for sharing as well Sandie :)
Thanks so much for this!!
Kind regards,
Mark Chuah
Sent from my iPhone
Any chance something like this could work with Articulate online?
Hi Dave and welcome to E-Learning Heroes!
Similar discussion here as well if you'd like to take a look.
For anyone following along, Dave also asked his question here (just in case some awesome responses crop up there).
I do use a similar script for this purpose with other LMSs. Question is whether or not Articulate Online supports it.
Hi Dave - Articulate Storyline supports JavaScript triggers, letting you extend the functionality of your courses. I cannot offer support for JavaScript and I know we do not support the execution of JavaScript in Articulate Mobile Player as you can see here.
This discussion is closed. You can start a new discussion or contact Articulate Support.