Forum Discussion
Getting the student name from the LMS
Hi,
I'm writing a user security awareness training course, part of which prompts the student to select whether an email is a phishing email or safe to open. I'd like to display the students actual email address in the example emails to make the questions feel more authentic.
Is it possible to query an LMS to pull the students email into the SCORM module as a variable?
Apologies of this has been asked elsewhere, I couldn't find an article covering this.
Mark
6 Replies
- SBP_IncCommunity Member
The LMS would need to provide the information to the courseware, which would likely need to have code (javascript) to parse (either from the launch URL, or the SCORM/TinCan API object). I would suggest searching the web for SCORM, TinCAN, xAPI and your LMS company's KnowledgeBase. The LMS provider in fact would be the first place I would start
- MarkMair-d5b693Community Member
Hi Brian, thanks for getting back to me. The LMS provider has given me the following:
LMSGetValue(“student_id”)
Where i'm struggling is to see how I can query that and write into a storyline variable.
- KnutJackowskiCommunity Member
Hi Mark,
to do this, you will first need to create a text variable and then change that via Javascript (create a trigger "Execute JavaScript".
This code will change an existing variable called "email" to the student_id, which might be the email (in our system it is not, but in many systems it is):
/* First you need the player to have access to the methods that will allow you to change variables in the course */
var player = GetPlayer();
/* this function looks for the lms API */
function findLMSAPI(win) {
// look in this window
if (win.hasOwnProperty("GetStudentID")) return win;
// all done if no parent
else if (win.parent == win) return null;
// climb up to parent window & look there
else return findLMSAPI(win.parent);
}
var lmsAPI = findLMSAPI(this);
/* I am using the method "GetStudentID()", because it is the common method for an LMS to provide this. You might have to replace it with the one provided by your LMS provider. */
var email = lmsAPI.GetStudentID();
player.SetVar("email", email);- MarkMair-d5b693Community Member
Hi Knut,
thanks for this. I really appreciate it.
Mark
- stephaniekalinkCommunity Member
Hi Knut,
I would like to do the same thing to get the student name from the LMS.
Can you explain more please ?
thank you so much - DeborahPerkinsCommunity Member
Does anyone know if you can get the registration date that way?
Related Content
- 10 months ago
- 11 months ago
- 11 months ago