We have a study (SetSelection) where, for the practice trials, we do not want the participants to progress to the next trial until they get the current trial correct. The responses are collected as two separate variables, and in order for the trial to be considered ‘correct’, both variables must match the corresponding ‘correct’ numbers in the training items CSV. The problem I’m having is, I can’t make it so that the condition in the .wait() for the continue button only returns true (and therefore continues) if both variables are correct. The .test() function doesn’t seem conducive to && logic, and I’ve tried every other way I can think of — nesting, sequential, etc. Every way I’ve written it allows the participant to continue either a.) if only one variable is correct, or b.) after sufficient toggling of the items. Do you know why this is happening / what a solution might be?
Be careful with selector.test.selected though, as it will crash if run when no element is selected. I’ll fix this bug in the next release, for the moment you should probably use a wait command on the selector before testing it.