Forum Discussion
KerryGreathouse
2 years agoCommunity Member
Compliance Training Sign-Off
Hi-
I have built a compliance training in Storyline 360 and am requiring the learner to enter their name at the end to agree with the compliance statement.
Is there a way to prevent them from be...
DavidCrocker
2 years agoCommunity Member
If you are using an LMS, we have used this small piece of Javascript to pull the name of the participant from the LMS. This would stop any jibberish.
You will need to create text variables firstName, lastName and fullName (case dependant) in your course.
{
var player = GetPlayer();
function findLMSAPI(win) {
if (win.hasOwnProperty("GetStudentID")) return win;
else if (win.parent == win) return null;
else return findLMSAPI(win.parent);
}
var lmsAPI = findLMSAPI(this);
var myName = lmsAPI.GetStudentName();
var array = myName.split(',');
var firstName = array[1];
var lastName = array[0];
var fullName = array[1] + " " + array[0];
player.SetVar("firstName", firstName);
player.SetVar("lastName", lastName);
player.SetVar("fullName", fullName);
}
You can trigger this to happen when the agreement slide starts and use the appropriate variable instead of asking them to enter their name.
We have used this on several different LMS's and it has always worked.
As an aside, you could put the trigger on the master slide and then use the variables to address the participant by name throughout your course.
- KerryGreathouse2 years agoCommunity Member
Thank you!
Related Content
- 2 years ago