Sometimes you would like to present a summary slide after a quiz where you present the user with their answers to the questions and give them some extra feedback.
If you run your courses in an LMS this can be achieved (with most LMS’) by reading the data stored in the LMS database. However, if you don’t deploy through an LMS you need to take a different approach.
You can achieve this by using user defined variables and advanced actions.
Basically you need to create one variable per question. I named my userQuestion1, userQuestion2, userQuestion3 etc.
These variables will be the containers for the answer the user selects on each question in your quiz. It’s not possible to run an action (or assign a value to a variable) on a question slide in Captivate. Therefore you need to insert a blank slide after each of your questions. It just needs to be 0.2 seconds long and here we will assign our user defined variables with the relevant value.
In Captivate 4 we have a system variable called cpQuizInfoAnswerChoice. This variable contains the selected answer to the question the user just answered. Note that this variable will be overwritten when the user answers a new question.
On our 0.2 second slide we go to the slide properties – navigation area and select the “On slide exit”. Here we want to assign a value to a variable so we pick Assign from the drop down list. In the Assign field we select our user variable – userQuestion1. In the “with” field we need to select what value to assign to our variable. Here we insert the cpQuizInfoAnswerChoice variable name.
Basically what will happen here is that when these 0.2 seconds are done Captivate will assign the value of cpQuizInfoAnswerChoice to our user defined variable userQuestion1.
On to question 2. Again we need to make a 0.2 second slide after question 2 and then assign userQuestion2 with the value from cpQuizInfoAnswerChoice. Do this for all your questions.
Now we should have a number of variables that will be populated with the values and we need to go to the next step.
The next step is to create a slide that will show some specific information based on the values of our user defined variables.
In my example I just used some text captions, but basically you can use whatever you want.
For each question we need to create a text box for each of the answer possibilities. I just have 3 answer choices to each question so I need to create 3 text captions per question.
In the text box you can write whatever you want. As an example you could write “You selected option A: 2+2 = 4. That is correct! Good job.”. You then need to go to the options tab of the text caption and assign it with a proper name. I used question1_a, question1_b etc. Also uncheck the “Visible” tick mark.
Now this text box is invisible until it is told otherwise by Captivate.
Once you have set up all of your text boxes it’s time to create an Advanced Action to handle the showing of the relevant text captions for each question.
Hit SHIFT + F9 to open up the Advance Actions part and create a new action. I called mine “showAnswers”.
Here we will set up a number of conditions and appropriate actions to perform when these conditions are met. For each question you need 3 conditions.
Here is the script you should use for each answer possibility on each question:
Check If ( userQuestion1 is equal to A)
Repeat this action for all of your answer possibilities and all of your questions. (don’t you just hate the fact that you can’t copy/paste in the Advanced Actions panel!!)
Now that we have our showAnswers action set up we go to the slide properties in the navigation part and select “On slide enter:” – Execute advanced action and select our showAnswers function.
Now when you run your quiz you should have a custom slide that shows you information based on what choices the user made.
Sample project (published and CP file) can be downloaded here: www.captivate4.com/demonstrations/quizAdvancedActions.zip
Have fun ;o)