Millisecond Forums

Repeat questions until a correct answer is provided

https://forums.millisecond.com/Topic16821.aspx

By ibaxendine - 8/2/2015

Hi,

I'm making a multiple-choice test in which questions are presented one at a time, and I'd like to make it so that the test moves questions answered incorrectly to the end of the test, and repeats them (indefinitely) until the subject answers the question correctly. 

The topic found here http://www.millisecond.com/forums/Topic11329.aspx outlines a similar process, but I'd really like to have the questions repeat indefinitely, instead of just a pre-defined number of times. I'd also, if possible, like a way to record how many attempts were taken to produce a correct answer. 

Can anyone offer any advice?
By Dave - 8/2/2015

Taking the script in the thread you mentioned as a basis, you can (1) set an exceptionally high number of repeats that no one will ever realistically exhaust, and (2) track the number of attempts per page via a bunch of values.

<values>
/ pg1_attempts = 0
/ pg2_attempts = 0
/ pg3_attempts = 0
</values>

<block myblock>
/ trials = [1-1000=sequence(pg1,pg2,pg3)]
</block>

<surveypage pg1>
/ ontrialend = [values.pg1_attempts+=1]
/ caption = "Page 1"
/ questions = [1=rb1]
/ skip = [radiobuttons.rb1.response=="A" || radiobuttons.rb1.response=="B" || radiobuttons.rb1.response=="C"]
</surveypage>

<surveypage pg2>
/ ontrialend = [values.pg2_attempts+=1]
/ caption = "Page 2"
/ questions = [1=rb2]
/ skip = [radiobuttons.rb2.response=="A" || radiobuttons.rb2.response=="B" || radiobuttons.rb2.response=="C"]
</surveypage>

<surveypage pg3>
/ ontrialend = [values.pg3_attempts+=1]
/ caption = "Page 3"
/ questions = [1=rb3]
/ skip = [radiobuttons.rb3.response=="A" || radiobuttons.rb3.response=="B" || radiobuttons.rb3.response=="C"]
</surveypage>

<radiobuttons rb1>
/ options = ("A", "B", "C", "Skip")
</radiobuttons>

<radiobuttons rb2>
/ options = ("A", "B", "C", "Skip")
</radiobuttons>

<radiobuttons rb3>
/ options = ("A", "B", "C", "Skip")
</radiobuttons>

<data>
/ columns = [date time subject group blocknum blockcode trialnum trialcode response latency correct values.pg1_attempts values.pg2_attempts values.pg3_attempts]
</data>