Hi,
I've been experimenting with the abort, branching, and abort experiment features, but I still don't really understand how I'm supposed to program what I want. I have two basic things I'm trying to do:
1) If a participant selects "I disagree" (meaning they do not wish to participate in this experiment) on the Informed Consent, the entire experiment should close out. The informed consent is in a <trial>.
2) If a participant wants to exit the entire experiment at any time, they should be able to do so. (Can participants use CTRL+Q to exit also?)
Thank you!
Ashley
You use the script.abort() function as detailed in the documentation and the example given therein:
<trial consent>/ ontrialend= [if ( trial.consent.response == 57 ) script.abort();]
[...]
</trial>
The above means: If the spacebar is pressed, the script is aborted. You have to adapt that to the available responses in your consent trial.
Yes, CTRL+Q can be used to abort the script at any time.
Is there a way for me to make the following occur:
If the participant clicks "I agree", it takes them through the experiment as normal.
If the participant clicks "I disagree", it takes them to a separate page, which says something like, "You have decided to not participate in the experiment. Possible alternatives for earning credits include [blah blah blah]. Please press the space bar to exit." Then they can click the space bar, which takes them out of the experiment.
I would really appreciate some guidance on how to make that happen.
Thanks,
In case of a 'disagree' response, /branch to a <trial> displaying the message you mentioned. Use the script.abort() function as already detailed previously in that message <trial> to abort the script.
I'm not programming it properly, but I can't figure out what I'm doing wrong. Here's what I have:
<trial InformedConsentP3>
/ stimulusframes = [1=InformedConsent3; 2=Agree; 3=Disagree; 4=AgreetoPar; 5=DisagreetoPar; 6=FormDate]
/ inputdevice = mouse
/ validresponse = (Agree, Disagree)
/ branch = [if (trial.informedconsentp3.response==Disagree) trial.noconsentexit]
<trial noconsentexit>
/ stimulusframes = [1=noconsentexit]
/ ontrialend= [if ( trial.consent.response == 57 ) script.abort();]
What should I be putting? Thank you so much for your help! I really appreciate this.
/ branch = [if (trial.informedconsentp3.response=="Disagree") trial.noconsentexit]
/ inputdevice = keyboard
/ validresponse = (57)
/ ontrialend= [if ( trial.noconsentexit.response == 57 ) script.abort();]