Restarting experiment if answer is incorrect


I have designed a quiz pre-task to make sure subjects understand the task. I am currently trying to set it up so if they fail the quiz, the experiment will restart from the beginning and they have to go through the instructions again. Then, if they fail the quiz a second time, the experiment will end for good and they will not be able to complete the task. Any thoughts on how to implement this would be amazing. Thank you.

It sounds like what you essentially want in a branched experiment - check out the demo “branchedExp” in Builder for an example of how to make certain routines progress only under certain conditions.

So you would have some code to say that the pre-task loop (which should have nReps set to 2) should break if they get the questions right, and some more code to say that the main experiment only progresses if they got the questions right.