Forum Discussion
TrainingEco-Alp
2 years agoCommunity Member
JavaScript with Adobe Learning Manager
I have been researching for a couple days now, and I have found some good JavaScript code for pulling information from the LMS and putting it into variables in my slide. I have been able to get this...
SandeepGadam
2 years agoCommunity Member
Hello there could you give it a try with the code provided below:
var player = GetPlayer();
console.log("Player: ", player);
var lmsAPI = window.parent;
console.log("LMS API: ", lmsAPI);
var myName = lmsAPI.GetStudentName();
console.log("Original Name: ", myName);
var array = myName.split(',');
var newName = array[1] + ' ' + array[0];
console.log("New Name: ", newName);
player.SetVar("lmsName", newName);
console.log("lmsName variable set to: ", newName);
Let me know if that works for you!!
Additionally, check if there are any JavaScript errors in the Adobe Learning Manager console or logs. Some LMS provide their own JavaScript APIs or methods for interacting with learner data.
Thank you!!