I’d like to capture the question text and chosen answers in a quiz and assign those to variables to be submitted to a database outside of our LMS. Currently, I can only get the chosen answer number (A, B, C) and not the text itself.
If I create a custom quiz, with a text caption and radio button widget, I can assign the selected rb okay but I have to also manually assign the question text to a variable (could be more effort with many questions).
So, the two variables I want to assign on each quiz slide would be quizQuestionText and quizChosenAnswerText.
Is there a way to dynamically assign the question text and question answer text to a variable from a quiz?
* I’m not asking to create a variable and assign the value to the text caption; I want the other way around.
Not sure about the question text, but a way to get the answer text via JS is described here. Didn’t try that myself though.
In the present situation now, where collaboration between JS and HTML5 output is a lot more to be trusted, I would use JS (array) to retrieve the text linked with the chosen answer which in most cases of the system variables is indeed the identifier (A, B….).
I suppose you are referring to the system variable cpQuizInfoAnswerChoice. Long time ago I have blogged about this variable, need to refresh that post. Here is a link;
http://blog.lilybiri.com/secrets-of-cpquizinfoanswerchoice-and
You must be logged in to post a comment.