Forum Discussion
Adding user name to training using JavaScript
Line 5: you're creating an array in Javascript, using a space as the delimiter. If your LMS does not store the learner's name using a space as the delimiter, you might not see anything. Try changing the delimiter to a comma and see if your LMS returns something:
var arrayName = myName.split(',');
Line 7: you're extracting the information parked in array element [0] (Javascript, like many programming languages, is zero-based, as in the first position in an array is index 0, not index 1). If you change this line to var newName = arrayName[1], when you run it on SCORM Cloud, you would see the first name.
Because elements like "Employee Location" and "Title" are not in the SCORM data model, you won't be able to extract those from your LMS.
- AnikaGlischi3523 years agoCommunity Member
Thank you so much!! Really appreciate this.
I tried it in Scorm cloud and it came out fine (Welcome Anika!)
However, the LMS did not return the name. :(
Should all LMS get results? Or can it be that this one does not return this data?