Get UserID from LMS via JavaScript code

Oct 18, 2022

Hi all,

I'm trying to get a UserID from our LMS (SuccessFactors). I want to use it within a progress report. I'm using the following code which works well when publishing in SCORM 1.2 but it does not work at all when publishing in SCORM 2004?

var player = GetPlayer ();

var learnerID = lmsAPI.GetStudentID();

player.SetVar("learnerID", learnerID);

 

I was able to get the User Name but the actual UserID works only when publishing in SCORM 1.2. Does anyone know if there is a way to make it work when publishing in SCROM 2004?

2 Replies
Andreas Fischer

Thank you very much for the prompt response, Phil. I found this code in previous discussion for this topic but unfortunately it doesn't seem to work when publishing in SCORM 2004. I wonder if our LMS (SuccessFactors) has got any restriction to prevent the transfer of the ID. However, I am able to get the User Name from the LMS. I'm very curious on what might be the issue here.