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
215 Replies
- 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?
- SteveFlowersCommunity Member
Hi Bruce -
Sort of... AO doesn't use SCORM, so the same method can't be used. What I was successful with was picking up the email address / username from the launching window. This only works when the user logs into AO first. If logging in using a guest link, it will fail. This also only picks up the account email and won't be able to access the first / last name since there isn't a way to get to that as far as I've found using any kind of API.
Doesn't mean that it doesn't exist:) You might try hitting up the team with a support request. I'd imagine this could be a popular ask.
- 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. - BruceRobertsCommunity Member
After a bit of poking about in Articulate Online, and in this instance, as I want to capture user entered variables and not just show the name in the lesson, I have hit upon the "Guestbook" feature in AO. Any lesson can be preceded with a form/questionnaire prior to launching. As we plan to create learner logins in AO using a list of email addresses and system generated passwords, the Guestbook Automatically captures the email address as the unique identifier. It is possible to add multiple custom questions. Any field has options as to whether the question is mandatory or optional. This will give us all the variables we need and then we can subsequently deliver the training package.
Just a couple of points to note:
1. if you test the Guestbook as Admin and then log in as a second user to test, do this on a different PC else the Guestbook considers you have already completed it. (Clearing cookies does not resolve this).
2. If you delete the lesson and recreate the lesson with the same name, the Guestbook is not deleted and old data fields are included in any new report. - 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.
- AngelaKimCommunity Member
Hi,
We are trying to retrieve two identifiers (numerical IDs) from the LMS to appear at the top of our course. Is there a way to do this with javascript and to appear in HTML5 output of the course when launched from our LMS? Our LMS is CECity. Any help would be appreciated...I don't know a lot about javascript, but this string seems to indicate that this is possible with names from the LMS, so I'm assuming other information can be pulled into the course as well. Thanks!
- AngelaKimCommunity Member
We're trying to create a seamless flow from a platform that will authenticate a user with two identifying numbers ("#######" and "#######") that will manually be entered by the user. Our IS team says that they can create an API call with these numbers...and I assume this API call would be sent to our LMS that will host the course. Once the course is launched from our LMS, we would like those identifying numbers to appear at the top of each slide. We are trying to avoid requiring them to enter that information again within the course in order to accomplish those numbers appearing at the top of each slide for the course.
Related Content
- 3 years ago
- 9 months ago
- 9 months ago