Sequence Run if based on accuracy
I'm looking to train participants, then check their training with a test. If participants complete the test with 100% accuracy (every question correct), they progress to the next phase. If they score <100%, failing even one of the questions, they repeat the train-test cycle for a maximum of three times.
In my sequence, I have a training loop, a test loop, and a training_repeat loop. I've tried setting the training_repeat loop to Run if [acc] = 0, but this only works based on the most recent trial accuracy, not the overall accuracy for the test loop, i.e. whether they got only the final question correct.
In the sequence, is there a way to set the training_repeat loop to Run if the test loop total accuracy is < 100%? And then should a participant score <100% after the third round of training, is there a way to no longer repeat the training, but instead move on to the next phase? Perhaps there is a better way?
This is for an experiment to be run online via JATOS, so sadly I am constrained in terms of inline script.
Any help very much appreciated!