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

5 Replies
Brian Dennis

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

Knut Jackowski

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);