Skip to main content
Zhiling
Participant
February 14, 2022
Answered

Pass LMS Student ID to a Captivate file

  • February 14, 2022
  • 1 reply
  • 421 views

We need to pass the LMS Student ID into a Captivate lesson and the use that ID in an url to access another website. I created a user variable "StudentID", and tried the following methods to get the LMS Student ID:

window.cpAPIInterface.setVariableValue("StudentID", cpQuizInfoStudentID);

window.cpAPIInterface.setVariableValue("StudentID", SCORM2004_GetStudentID());

window.cpAPIInterface.setVariableValue("StudentID", objLMS.GetStudentID());

window.cpAPIInterface.setVariableValue("StudentID", SCORM_GetStudentID());

But none of them works. It returns nothing without any error message. 

Anyone can help? 

    This topic has been closed for replies.
    Correct answer Lilybiri

    Are you sure that the LMS is populating cpQuizInfoStudentID and cpQuizInfoStudentName?

    Check it out by inserting those variables in a text container, using the X button in the Character part of its Properties panel. Not all LMSs connect that way.

    1 reply

    Lilybiri
    LilybiriCorrect answer
    Legend
    February 14, 2022

    Are you sure that the LMS is populating cpQuizInfoStudentID and cpQuizInfoStudentName?

    Check it out by inserting those variables in a text container, using the X button in the Character part of its Properties panel. Not all LMSs connect that way.

    Zhiling
    ZhilingAuthor
    Participant
    February 14, 2022

    Hi Lilybiri,

    Thanks for your response. 

    I created the StudentID and StudentName user variables and displayed the variables on the slide along with the following script on entering the slide:

    window.cpAPIInterface.setVariableValue("StudentID", cpQuizInfoStudentID);
    window.cpAPIInterface.setVariableValue("StudentName", cpQuizInfoStudentName);

    After uploading the lesson to our LMS, it returns nothing, no error message. 

    Feels like the Captivate lesson is not communicate with the LMS interface. 

    Thanks. 

     

     

     

     

    Lilybiri
    Legend
    February 14, 2022

    Why did you not try the original user variables. I have no idea why you transfer their value to a custom variable to do this test.