# Variables

Feb 23, 2023

I have created a quiz.  The quiz questions have four answers.

There are four possibilities:  incorrect, incorrect1, incorrect 2, and correct.
I want to set the tries at TWO.
Selections A), B), C), and D) have specific feedback for each.
So, if the learner selects A), he gets feedback for A), and so on.
The triggers for feedback are set to correct, incorrect, incorrect1, incorrect2 (again specific to the selected answer).
After the 2nd wrong selection, the learner would receive the feedback under incorrect and move to the next question.
I believe I would need some type of an "if-then" variable - but I am unsure how to do this - any help would be appreciated.

Thanks

Nancy

###### 8 Replies

You will need to create a new layer to show when the attempts equal 2 (call it Incorrect 4). On each of the other incorrect layers add a trigger to show layer Incorrect 4 when the timeline starts on the layer if the Variable Attempts is greater than or equal to 2.

That should do it. See attached.

I am not sure if I am understanding your design, but it sounds like what a default,Choice based feedback question would do without any additional triggers or variables added.

Do you have question slide you can share?

No - your slide is a general either pick one or m/c question with feedback. With the same scenario - EACH of the four choices EACH has its own feedback. So if a learner picks A - he gets A feedback; if he selects B - he gets feedback for B  - each of the choices or answers has its OWN feedback depending on what the learner selects.

Using "choice" for feedback in the design menu does NOT work.  I want the learner ONLY to get two attempts to answer. So use of variables would be what I would think could work. But I don't understand how to execute the variables necessary to trigger the final feedback with after only two attempts.

I tried that first - it did not work.

EACH of the four choices EACH has specific feedback based on the answer. So if a learner picks A - he gets feedback specific to A; if he selects B - he gets feedback for B  - each of the choices or answers has its specific feedback depending on what the learner selects.

Using "choice" for feedback in the design menu does NOT work.  I want the learner ONLY to get two attempts to answer. So use of variables would be what I would think could work. But I don't understand how to execute the variables necessary to trigger the final feedback after only two attempts.

Both Walt's solution and my solution should work for you.  Walt uses a state change on the feedback text to provide specific feedback based upon the chosen answer. So, if the learner picks "A" the feedback state is changed to "A" feedback. In my example I use a unique layer to provide feedback for each choice. So, if the learner selects "A, the layer "A" displays with the "A" feedback. In both examples, once the learner has chosen incorrectly twice, the Incorrect feedback displays and the continue button advances to the next slide.