Forum Discussion
Variable to enforce course standard
Hello Dana,
Thanks for reaching out!
You can control the maximum number of attempts by using a numerical variable that keeps track of the number of times that a learner has attempted your quiz. Using trigger conditions, you can then limit the number of attempts to 2 by referencing that variable.
It might be easier to explain how this can be done by showing you, so I've attached a sample project file which uses variables and trigger conditions to limit a learner's quiz attempts to 2. There are multiple ways to approach this design requirement, but the way I did is is to increment a variable called attempts by 1 each time a learner retries a quiz, and then redirecting the learner back to the start of the course once 2 attempts have been reached.
Some important notes:
- I had to create a variable called attempts to track the number of attempts
- The retry quiz button incremented the attempts variable by 1 each time it was clicked
- I added the trigger conditions to the 'jump to slide' triggers so that they redirect learners depending on how many attempts have already been taken
Let me know if you have any questions!