The skip command defines conditions in which trials or survey pages should be not be run.
<block> <expt> <likert> <openended> <sliderTrial> <survey> <surveyPage> <trial>
Name | Type | Description |
---|---|---|
script | script | Specifies the expression to evaluate to determine whether the trial(s) should be skipped. |
The skip attribute can be used to create task flow that dynamically adapts based on the subject's performance or the current state of the script. Each condition specified in the skip command or commands is evaluated, and if any one of them is true (either logically true or producing numeric result not equal to zero), the trial is not run.
Requires an explicit 'return' statement.
The following trial is skipped if 10 incorrect responses are given in a row.
<trial myTrial>
/ stimulusTimes=[0=myText]
/ validResponse=("a", "b")
/ correctResponse=("a")
/ skip={
return this.errorStreak >= 10;
}
</trial>
The following trial is skipped if the user selected option 1 on a radio button survey item.
<trial myTrial>
/ stimulusTimes=[0=myText]
/ validResponse=("a", "b")
/ correctResponse=("a")
/ skip={
return radioButtons.choice.response == 1;
}
</trial>
The following block is skipped if the participants mean latency up to that point is greater than 1000.
<block myBlock>
/ trials=[1-20=noreplace(testtrials, distractortrials)]
/ skip={
return this.meanLatency > 1000;
}
</block>