Forum Discussion
Retrieve LMS User Name as Variable
I know you can have a user fill in a text box with their name and then later use that variable for personalization. What we would like to do is programmatically retrieve the user name from the LMS. Is there a way to set a variable with data from the LMS when the course is loaded instead of having the user enter their name?
Thx
- DavidTappendenCommunity Member
Sooo, 4/5 years later I have the same question.
I'm hoping for progress in terms of a solution to this and working with HTML5 - can anybody give an update as to if this works in HTML5 yet?
Many thanks :)
- SteveFlowersCommunity Member
The above method should also work with Storyline 2 as well as Storyline 1 (no HTML5 in SL1).
- JochenUlmerCommunity Member
Hello,
I try this script with the Ilias LMS System. But it doesn`t run.
Regards,
Jochen
- JohnCutlack1Community Member
Lots of potential solutions here from the community but does anybody have a script that is known to be able to pass a student's name from SAP's SuccessFactors LMS to a SCORM object produced in SL2?
- AxelDitter-66bbCommunity Member
good question: need the same solution ... but can t find it (for sucess factors)
any idea?
cheers
Axel
- ChristaFurtmlleCommunity Member
Hello everybody,
old question I know, but I do not know, if it works with HTML5 in the meantime.
Thanks! - BrianAllenCommunity Member
This is the topic thread that just keeps on giving
- BruceRobertsCommunity Member
Has anyone got this to work in Articulate Online?
- BruceRobertsCommunity Member
Hi Steve,
I got an out-of-character unhelpful response from support simply saying the API is not supported and pointing me to two discussion forums that were not really appropriate to the issue. I'd love to know how you picked up the email as potential users would log into AO with email and randomly generated password.
For this particular project, the client, (on a tight budget as this is for a major one-off event supported by volunteers), likes the option of AO as it is good value and delivers content efficiently. All output data is going to an external database so interaction reporting is not required, but if we can't pull out learner identifiers (email would be perfect) we'll need to opt for a more expensive SCORM compliant solution. - DireccindeTe540Community Member
Can I use similar (js) codes to obtain the user from canvas in the storyline or a google sheet. I tried it with the code you gave but got no results.
- nathanleavittCommunity Member
The lmsAPI.GetStudentName(); method no longer works for me when I publish to HTML5 only. Here's the code that I use for HTML5:
//This trigger is set to execute when the timeline starts. In order for it to work, this slide requires a variable "newName".
//Get User Name embedded into file from LMS
var myName = SCORM_GetStudentName();//SCORM has last name, first and we are switching it around to first last.
var array = myName.split(',');
var newName = array[1] + ' ' + array[0];//Set the variable
var player = GetPlayer();
player.SetVar("newName", newName);FYI, we’ve found that although the lms.js file is still included in the published HTML5 zip package, it’s not actually used and all its functions and variables aren’t used in our LMS. I’m not sure if that has something to do with our LMS (Saba Cloud) or something else. Regardless, that’s why the lmsAPI variable is undefined in our LMS. Instead I used the SCORM_GetStudentName(); function from SCORMFunctions.js.