Forum Discussion
SallyMilford
9 years agoCommunity Member
Pulling first name from LMS
Hi all - I'm wondering if anyone might be able to put together a step-by-step guide as to how to set up a variable / javascript function for this? (i.e. pulling a user's first name from the LMS).
...
GlendaDeHoff-0c
5 years agoCommunity Member
I am struggling with using JavaScript to capture the user's first and last names from the LMS (Vector Solutions). They store the user name as "Firstname, Lastname, Middle". This is the code I am using but it is not working. I was able to insert the date using JavaScript.
var lmsAPI = parent;var name = lmsAPI.GetStudentName();var nameArray = name.split(",");var lastName = nameArray[1];var firstName = nameArray[0];var player = GetPlayer();player.SetVar('first_name',firstName);player.SetVar('last_name',lastName);
Related Content
- 2 months ago
- 8 months ago
- 3 years ago