+x#2: "I want the subject to not be able to continue until they are correct." <- This needs to be fleshed out more. Suppose the subject gives a wrong response, then what is supposed to happen? Do you want to display the same page / question again? Or do you want something else to happen (what)?
> if they give a wrong response, I want the same question/page to be displayed again again and for that to be repeated until they get the correct response.
Further question, from the radiobutton code that you have, there is a correct answer coded but I'm not sure what that is doing. When I get the survey data, it contains the response but there is no coding about whether it was the correct or incorrect response.
Much appreciated!
> if they give a wrong response, I want the same question/page to be displayed again again and for that to be repeated until they get the correct response.
Okay, thanks for the clarification. This is what the code in my previous reply already does, so I don't think any further elaboration is necessary.
> Further question, from the radiobutton code that you have, there is a correct answer coded but I'm not sure what that is doing. When I get the survey data, it contains the
> response but there is no coding about whether it was the correct or incorrect response.
The data format for <survey> elements is different than the date format for regular <block>s. In survey-data, there is no "correct" column. You can see what the /correctresponse code does when running the page via a <block> instead:
<radiobuttons task>
/ caption = "What is your task?"
/ required = true
/ options = ("To respond for each picture of a dog", "To respond whether a picture is rotated or not","To respond when a picture is black and white or color")
/ optionvalues = ("1", "2", "3")
/ validresponse=("1", "2", "3")
/ correctresponse = ("2")
</radiobuttons>
<surveypage taskQ1>
/ caption = "Please answer the following questions about your ask. You cannot start the experiment until you get these correct."
/ fontstyle = ("Verdana", -18, true, false, false, false, 5, 0)
/ responsefontstyle = ("Verdana", -12, false, false, false, false, 5, 0)
/ itemfontstyle = ("Verdana", -13, false, false, false, false, 5, 0)
/ itemspacing = 4%
/ showpagenumbers = false
/ showquestionnumbers = true
/ questions = [1=task]
/ branch = [
if(radiobuttons.task.response != "2") surveypage.taskQ1
]
</surveypage>
<block taskQuestionnaire>
/ trials = [1=taskQ1]
</block>