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
- JørgenNielsenCommunity Member
You might test your course in ADL Sample Run Time Environment or in SCORM Cloud. If it works there, you have a good argument against your LMS vendor.
- PhillipBaref751Community Member
I am doing the same thing trying to get the Users ID or Email from the LMS. I am trying to have a promotion in the course that will give the Users ID or Email over to a website that will randomly select a winner for a prize. I want to use something more than just the users name because there maybe people with the same name. I need help getting this info and then giving it to a website to see if they can win. thanks for any help you can give.
- AlexYong1Community Member
Did some searching and stumbled across this forum. Just a couple questions about this and hoping someone might have an answer.
1) Has anyone figured out a way to get this working with HTML 5 yet?
2) Has anyone gotten this to work on the Skillport LMS?
Thank you in advanced to anyone who might have an answer!
- ChrisFCommunity Member
I am trying to pull the users "business area" from the LMS so I can bespoke parts of the learning to meet their specific roles/needs, however, I have tried amending the above script but no joy so far.
Any ideas? The data is stored in the LMS as Division
Has anyone had any success in pulling division/dept from the LMS? If so, could you possibly share the code?
Thanks
- KawstovFLIPCommunity Member
I got some help in the same area, here:
https://elearningenhanced.com/blog/2012/08/15/grabbing-student%E2%80%99s-name-lms-storyline
- JamesBrandwoodCommunity Member
Thanks!
Works great... once I realised it's caps sensitive.
- IsraelRodriguezCommunity Member
I'm trying to generate a certificate that contains the name of the student. I created a button that opens an html file with the certificate design, and the code I'm using is:
var player=window.opener.GetPlayer();
var learnerName=player.GetVar("newName");
document.write("" +learnerName+ "");Yet, I'm getting undefined as a result. What am I doing wrong?
Hi Israel, and welcome to Heroes!
Although we don't support the creation of certificates, I wanted to point you to this KB article with a few methods described. Additionally, this thread with an example from Steve Flowers is a popular one, and a great place to discuss customizing the certificate further.
- IsraelRodriguezCommunity Member
Hi Ashley, thanks for your answer.
I actually did base my certificate on Steve Flowers' example and following some of the posts on that thread.
However, I'm still getting "undefined". Moreover, using firebug to debug js I found out that lmsAPI.js functions are not working as if the .js file was not being loaded.
I'm not a Javascript expert ( or even a novice) so I'll defer to someone in the community to help you out! You may also want to post in that other thread if you didn't already - Steve Flowers is generally pretty good at getting back to people there.