Highlighted

Triggering the Submit Button on a Quiz slide Using Javascript

New Here ,
May 13, 2019

Copy link to clipboard

Copied

Hello All,

I am collecting learner behavior data via variables and advanced actions through-out all of my Captivate 2019 course.  My plan was to report these final variable values out using hidden Quiz questions (I do something similar in Articulate 360).  Each course has a test (quiz) which is set up as SCORM 2004. With this I can get a question analysis report from my LMS that gives me all the questions and the learner responses. I then get my hidden variable data out to perform additional analysis on.

I have been able to successfully get the data i want into the system variable cpQuizInfoAnswerChoice on a Quiz Short Answer slide. The problem is that even though I am putting a continue line and next line and submit line (tried them all) into my javascript. The slide is still not moving forward - it wants the user to click the submit button.

Is there a way to bypass/trigger the submit button other than having it clicked on a Quiz slide??

Any other suggestions for what I'm trying to do will be appreciated.

TOPICS
Advanced

Views

350

Likes

Translate

Translate

Report

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

Triggering the Submit Button on a Quiz slide Using Javascript

New Here ,
May 13, 2019

Copy link to clipboard

Copied

Hello All,

I am collecting learner behavior data via variables and advanced actions through-out all of my Captivate 2019 course.  My plan was to report these final variable values out using hidden Quiz questions (I do something similar in Articulate 360).  Each course has a test (quiz) which is set up as SCORM 2004. With this I can get a question analysis report from my LMS that gives me all the questions and the learner responses. I then get my hidden variable data out to perform additional analysis on.

I have been able to successfully get the data i want into the system variable cpQuizInfoAnswerChoice on a Quiz Short Answer slide. The problem is that even though I am putting a continue line and next line and submit line (tried them all) into my javascript. The slide is still not moving forward - it wants the user to click the submit button.

Is there a way to bypass/trigger the submit button other than having it clicked on a Quiz slide??

Any other suggestions for what I'm trying to do will be appreciated.

TOPICS
Advanced

Views

351

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

Unless you really need a quiz slide, you will probably be better off using a non-quiz (normal) or knowledge check slide. You can then make your own Submit button that does what you want. Custom slides can still report their scores to the quiz but bypass all the built-in code that quiz slides have in the background. Since you're using SCORM2004 you have tons of variable reporting space on the LMS and should be able to get back all the interaction data you need.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 13, 2019 0
New Here ,
May 13, 2019

Copy link to clipboard

Copied

Hello dan56,

Thank you for your response. However, your response said that I can then make my own Submit button - the problem is I do not want a submit button. I want background code to submit the answer (my variable data). I don't want the user/learner to have to click on a submit button. I don't want the learner to see any of this. It should all be happening in the background and then just show up in my reports.

Did I perhaps miss something in your response that would allow this?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 13, 2019 0
Most Valuable Participant ,
May 14, 2019

Copy link to clipboard

Copied

You posted the same question on my personal website. Understand that I don't answer support questions personally. My blog is totally free.

May be wrong but you seem to think that only quiz slides can be scored and reported which is not correct. Each interactive object can have a score and can be reported as interaction to a LMS.  Quizzing system variables are read only, but with JS or with the CpExtra widget developed by InfoSemantics (AU) they can be manipulated.  But that is not the question: it is reporting of the values of user variales which you'll need if I understand your question correctly. That has nothing to do IMO with a Submit button on a quiz slide. Is this correct? That depends on the LMS in the first place: how is it showing the values of variables which are not the quizzing system variables?

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

Mariat - As LIlybiri says, all interactive objects can be made to report to a quiz score. They also can store values in variables. SCORM2004 has lots of data space to store variable values - your trick will be to pull that out and do your analysis. As long as the interactions you're using, including fill-in-the-blank and short answer fields, are saving user input to variables you can pull that data. You can set up the Captivate slide to store the data without a Submit button.

The way your LMS stores all of that will determine how you retrieve what you want. Talk to your LMS people - they'll be able to tell you how things stand on their side, then you'll have a better idea of what you need to do to get your data. You may have to get into cmi.suspend_data

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 14, 2019 0
New Here ,
May 17, 2019

Copy link to clipboard

Copied

Thank you for your reply.

I'm not familiar with other reports not associated with quiz results. Is there someplace I can learn more about those?

My goal is to get my custom variable data (collected throughout many slides using advanced actions) out of the elearning unseen by the learner so that I can than do an analysis of this data on how the learner interacted with the elearning. I currently do this in Storyline using hidden quiz slides that I populate the answers with using javascript. My data then comes out in the Question Analysis report that shows the questions and answers provided. I do not need a score on these. Each learner is required to take the quiz at the end of each course so that is how I am guaranteed to get my data. I was taking the same approach with Captivate but running into an issue with the submit button.

My LMS is collecting completion data and pass/fail data to insure people are taking and passing tests on required courses.

I would like to learn more about your comment "Quizzing system variables are read only, but with JS or with the CpExtra widget developed by InfoSemantics (AU) they can be manipulated."  Can you please let me know where I could get some good information on this approach? I am not familiar with the CpExtrawidget.

Any other advice or suggestions on how I can reach this goal in Captivate would be greatly appreciated.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 17, 2019 0
Most Valuable Participant ,
May 17, 2019

Copy link to clipboard

Copied

Have a look at the website:

http://www.infosemantics.com.au/

You can download a trial version of that widget for free.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 17, 2019 0
New Here ,
May 17, 2019

Copy link to clipboard

Copied

Thank you for the link, however, my company does not allow me to download and install 3rd party widgets.

It looks like I will need to use the custom quiz question slide. Do you know if I can avoid having the learning click a submit button on these?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 17, 2019 0
Most Valuable Participant ,
May 17, 2019

Copy link to clipboard

Copied

The Submit button is the real key object on quiz slides, I don't see how you can avoid using it if you want to have the quizzing variables to update.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 17, 2019 0
New Here ,
May 19, 2019

Copy link to clipboard

Copied

Hello Mariat,

 I have a custom quiz question that does not use a Submit button.  Instead, I set variables when the correct answer combination is selected, and use an interval timer in JavaScript to check whether that variable has been set or not. If the variable has been set, I show a continue button.  

It works great. Here is my JavaScript code; perhaps you can adapt it:

setInterval(function() {

var rightAnswers = window.cpAPIInterface.getVariableValue("astroRight");

var wrongAnswer = window.cpAPIInterface.getVariableValue("astroWrong");

if ((rightAnswers==3) && (wrongAnswer==0)) { 

cp.show("q_astro_m1cont"); }

else { cp.hide("q_astro_m1cont");}

},100);

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 19, 2019 0
New Here ,
May 22, 2019

Copy link to clipboard

Copied

Thank you ToyinJA - I will give this a try and report back.

Likes

Translate

Translate

Report

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