URL of experiment: Sign in · GitLab
Description of the problem: Hi everyone! I’m having an issue with running an experiment online on Pavlovia. It works on the builder (version 2020.1).
The issue is: It is a task-switching paradigm and, for the practice trial, the participants have to repeat the practice in case they made less than 9 correct trials out of 12. I created a counter for the correct response in the practice trial in a code component and the code looks like this:
’ if practice_shape.thisN == 0:
number_correct = 0 ’
where practice_shape is the name of the loop (which also contains a fixation cross and a feedback for correct response that prints “correct” or “Incorrect”)
and in the end routine:
’ if prac_resp.corr:
number_correct = number_correct + 1 ’
where prac_resp is the keyboard component
then, in the outer loop I’ve created a routine called “end_prac” with a code component:
’ if number_correct > 9:
practice_back.finished = True
skipThisTrial = True
continueRoutine = False ’
This allows participants that make more than 3 mistakes to go back and redo the practice, and those who make more than 9 correct to not begin the routine and jump to the next on.
This works on psychopy builder but not online.
I’ve spent some time reading previous topics and I’ve tried different ways but it still does not work online.
Can anyone help?
Thank you so much,