Displaying cpQuizInfoStudentID on screen?

Participant ,
Oct 01, 2014

Copy link to clipboard

Copied

I'd like to brand courses based on user. I'm under the impression I'll need to work with the 'cpQuizInfoStudentID' variable to accomplish this.

For now I'm just trying to get the variable to display. I made a text caption with $$cpQuizInfoStudentID$$ but I can't seem to get it to display any value. Any reason why? Do I need to do something specific to get that value into the course? Do I actually need to complete a quiz before this variable is populated in captivate?

I've tried publishing this course in cap. 8, Uploaded it to scormcloud via my LMS api. I lauch from my LMS but it's just blank in text caption where $$cpQuizInfoStudentID$$ should be.

Views

795

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

1 Correct Answer

Contributor , Oct 02, 2014
Russ_E Contributor , Oct 02, 2014
As Lilybiri pointed out, cpQuizInfoStudentName will be there automatically.The course grabs its value from an LMS when it first initiates the session.For cpQuizInfoStudentID, if you really want to use that, you need to GET the value first yourself.How you do that depends on which standard you're publishing too (e.g. SCORM2004_CallGetValue, SCORM_CallLMSGetValue, etc...).Much easier to use cpQuizInfoStudentName.Hope that helps.

Likes

Translate

Translate
Jump to answer Jump to answer
Most Valuable Participant ,
Oct 02, 2014

Copy link to clipboard

Copied

The variable cpQuizInfoStudentName should be populated (if the connection with LMS is OK) when a user logs in, with its login user name. Did you try that variable with a LMS? The variable you used is for Internal Server reporting, not sure it gets populated when you use a LMS.

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Participant ,
Oct 02, 2014

Copy link to clipboard

Copied

Hi Lilybiri, as mentioned above, I am launching the through my LMS through the course list of a specific user. The lms recorded that the course was started for that user. Are you saying I need to specifically send that variable from my LMS?

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Most Valuable Participant ,
Oct 02, 2014

Copy link to clipboard

Copied

No, I did tell you to use cpQuizInfoStudentName, not cpQuizInfoStudentID. Was that not clear in my previous answer? If you read the description of both variables, maybe you'll understand?

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Contributor ,
Oct 02, 2014

Copy link to clipboard

Copied

As Lilybiri pointed out, cpQuizInfoStudentName will be there automatically.

The course grabs its value from an LMS when it first initiates the session.

For cpQuizInfoStudentID, if you really want to use that, you need to GET the value first yourself.

How you do that depends on which standard you're publishing too (e.g. SCORM2004_CallGetValue, SCORM_CallLMSGetValue, etc...).

Much easier to use cpQuizInfoStudentName.

Hope that helps.

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Participant ,
Oct 02, 2014

Copy link to clipboard

Copied

Sorry Lilybiri as the first bunch of characters in the two different variables are the same, I miss-read what you were saying. I can get cpQuizInfoStudentName to display Thank you.

@Russ_E good to know there are specific requirements for cpQuizInfoStudentID. I agree it would be much easier to use cpQuizInfoStudentName, but that value is not necessarily a unique identifier is it? If I had two John Smith's in my system, I wouldn't be able to identify which one was running the course would I?


I'm publishing to scorm 2004, so I'll search around for how to use SCORM2004_CallGetValue.

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Participant ,
Oct 07, 2014

Copy link to clipboard

Copied

Took me awhile to sort out the proper script to use. Thought I'd leave a trail here of what I did.

To get the variable in captivate i used: window.cpAPIInterface.setVariableValue("studentID", SCORM2004_GetStudentID());

studentID is my own user variable and SCORM2004_GetStudentID() is a function defined in scormdriver.js

Ultimately I wanted to use this variable in a web object so I can display a custom logo. to do that I used: StudentID =  window.top.SCORM2004_GetStudentID(); within the web page displayed by the web object.

As some of these files may be dispatched to alternate LMSs that might use different scorm versions, I imagine my next step will be to check the scorm version and choose the appropriate get value function.

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Explorer ,
Dec 28, 2019

Copy link to clipboard

Copied

I realize this is pretty old but I thought this might help future vistors. 

If you don't know (or care) which version of SCORM/xAPI etc you are using then you can simplify the call by using:

objLMS.GetStudentID()

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more