Adobe Captivate’s multiple choice questions can either be a single answer or multiple answers. A limitation of multiple answers in quizzes is that you can’t specify the number of answers you want the user to select. This tutorial shows how to get Captivate to count the number of answers selected and then display a message if correct amount is not selected.
HOW THE PROJECT IS SETUP
You can download the Captivate 9 project file for this post here.
The project contains 2 variables both set to a default value of 0.
v_ResponseMath keeps track of how many responses are selected.
v_ResponseVault stores the answers selected in the quiz.
The project also has a single conditional advanced action, "ValidationAction," which I’ll discuss in the quiz slide setup.
1 FIRST SLIDE
Contains a single button that jumps directly to the quiz slide.
2 --REMEDIATION SLIDE--
The slide is set to a duration of 0.1 seconds and the On Exit action is set to “Return to Quiz.” (I only add the double hyphens in the slide name so I know to uncheck this slide in the Table of Contents so it won’t appear to the end user if I’m publishing with the Table of Contents visible.)
3 QUIZ SLIDE
This is a multiple-choice slide that has 6 answers and is asking the user to select the 4 fastest animals. The slide also has a smart shape, “ErrorMessage,” which is set to be not visible in output and contains text informing the user how many answers they’ve selected, via the variable v_ResponseMath, and how many answers they need to select.
The On Success and Last Attempt actions for the quiz slide are set to the same Conditional Advanced Action, “ValidationAction.” The first decision of the action uses the IF statement “1 is equal to 1” so that the action triggers and the first step of the action assigns the v_ResponseMath variable with 0. The decisions that follow will then increment this variable so it’s necessary include this as the first step to reset the variable each time the advanced action is run so it always starts from 0. The second step of the action assigns v_ResponseVault with all the answers that were selected.
The next six decisions are relatively identical and calculate how many responses were selected. The IF statement for each decision looks at v_ResponseValue to see if it contains a number, which corresponds to each individual answer the user selected, that was assigned during the first decision. If the number exists in the variable it increments v_ResponseMath by 1. (I’m using numbers in each of these decisions because the Quiz numbering is set to none. If it’s set to alphabetical numbering then the validation for these decisions would need to be letters instead of numbers.)
After all 6 Response decisions are executed, the last decision, named "AnswerValidation," looks to see if v_ResponseMath is not equal to 4. If the variable is anything but 4, the action will show the smart shape “ErrorMessage” and sends the user to the remediation slide. Because the remediation slide’s Exit action is set to return to quiz, the user is sent right back to this quiz slide which allows them to change their answers.
This is also the only decision which has anything under the ELSE part. Should the v_ResponseMath be equal to 4, the ELSE decision hides the smart shape, should it have already been shown because the user didn't selecte the correct number of answers at least once, and then continues the project.
Because quiz slides will always place the quiz content above anything else on the slide, you may need to adjust the size of the answer captions as well as the outer container for all the answers. Otherwise, the error message would be behind the quiz answers.