We are working on a task where participants watch a video and answer a question about the video by typing in their response. If they type in the wrong response (anything but the letter L), we want them to be told of their mistake and then go back and watch the video again, and then take the little quiz where they provide an answer. If they provide the answer incorrectly for the second time, we want them to see a message telling them the program will quit, and then the study ends. If they type the correct answer initially or on their second attempt, we want them to be able to move on to the block called pretest.
We have found that for whatever reason, our branching does not work. Below is our code where the branching takes place:
<openended characterresponse>
/ stimulusframes = [1=VidACinstruct]
/ position = (50, 45)
/ linelength = 75
/ numlines = 2
/ charlimit = 10
/ buttonlabel = "Submit"
/ correctresponse = ("L")
/ validresponse = (anyresponse)
/ branch = [if (contains(openended.characterresponse.response, "L") == true) block.pretest;
if (contains(openended.characterresponse.response, "L") == false && values.incorrectresponsetrial == 0) trial.videoerror1;
if (contains(openended.characterresponse.response, "L") == false && values.incorrectresponsetrial != 0) trial.videoerror2]
</openended>
<trial videoerror1>
/ validkeys = ("k")
/ stimulusframes = [1=VidACerror1; 2= MCCinstructions; ]
/ ontrialend = [openended.characterresponse]
/ ontrialbegin = [values.incorrectresponsetrial = 1]
</trial>
<trial videoerror2>
/ validkeys = ("k")
/ stimulusframes = [1= ACerrormessage]
/ ontrialend = [values.incorrectresponsetrial = 2]
/ quit = [ values.incorrectresponsetrial == 2]
</trial>
<expt Pretest>
/ blocks = [1= consentform; 2=MCCvid; 3= VideoQ;]
</expt>
<values incorrectresponsetrial>
/ incorrectresponsetrial = 0
</values>
We are also confused about what we should put in our experiment. Currently, we have these three blocks, however, even if the person types the correct answer in VideoQ it is not branching to our Pretest block like we want. When we added 4=pretest; 5=demographics; to our experiment, regardless if they answer the question in VideoQ incorrectly, they moved on to our Pretest block.
Please help, we have tried different ways of writing the branching and putting it in different elements and nothing is working. Thank you!