Group: Forum Members
Posts: 31,
Visits: 119
|
Hello,
I am trying to redirect participants to a previous set of three survey pages (one "Please try again" page, and then a repeat of a stimulus image (shown on its own page) and then a question about that image (shown on the next page) if they answer a survey question incorrectly. Participants will first be presented with an image, on the next page they will be asked one question about the image. If they answer incorrectly, they need to be redirected to a "Please try again" page, followed by the image page and the question page. This should repeat until the participant selects the correct answer, at which point they should move forward to the next block. I am new to coding script and I tried to look over previous forum questions about conditional branching and redirecting to trials, but I am not sure if this relates to survey pages. Any help would be greatly appreciated!
Thank you!!
I have the following related code in my script:
Here is the one question that participants need to answer (correct answer is 1, all other answers need to redirect):
<radiobuttons question1> / caption = "instructions" / options = ("response", "response", "response", "response", "response") / optionvalues = ("1", "2", "3", "4", "5") / validresponse = ("1", "2", "3", "4", "5") / correctresponse = ("1") </radiobuttons>
<surveypage page1> / stimulusframes = [1=image] </surveypage>
<surveypage page2> / caption = "instructions" / questions = [1=question1;] / branch = [if(radiobuttons.question1.response != "1") block.block2] </surveypage>
<surveypage page3> / caption = "Please Try Again" </surveypage>
<block block1> / trials = [1 = page1; 2 = page2;] </block>
<block redirect> / stop = [block.redirect.error] / branch = [if (block.redirect.error) block.redirect] / trials = [1 = page3; 2 = page1; 3 = page2;] </block>
<block block2> / trials = [1 = pagex;] </block>
|