Millisecond Forums

branching if incorrect

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

By anisa_khalfan - 10/12/2020

Hi, 
Super quick question. This is what I have so far, I am trying to repeat the block (for maximum 3 times) if any of the three questions were answered incorrectly.
It returns an error in the block's second branch statement. 

<trial Q1>
/ stimulustimes = [1=Q1]
/ correctresponse = ("2")
/ validresponse = ("1","2","3")
/ errormessage = true(Q1Incorrect,10000)
/ correctmessage = true(Q1Correct,10000)
/ recorddata = true
</trial>

<trial Q2>
/ stimulustimes = [1=Q2]
/ correctresponse = ("2")
/ validresponse = ("1","2","3")
/ errormessage = true(Q2Incorrect,10000)
/ correctmessage = true(Q2Correct,10000)
/ recorddata = true
</trial>

<trial Q3>
/ stimulustimes = [1=Q3]
/ correctresponse = ("3")
/ validresponse = ("1","2","3")
/ errormessage = true(Q3Incorrect,10000)
/ correctmessage = true(Q3Correct,10000)
/ recorddata = true
</ trial>

<block quiz>
/ trials = [1=Q1; 2=Q2; 3=Q3]
/ recorddata = true
/ screencolor = white
/ branch = [if (block.quiz.count > 3) 0]
/ branch = [if (trial.Q1.incorrect || trial.Q2.incorrect || trial.Q3.incorrect) block.quiz]
</block>
By Dave - 10/12/2020

anisa_khalfan - 10/12/2020
Hi, 
Super quick question. This is what I have so far, I am trying to repeat the block (for maximum 3 times) if any of the three questions were answered incorrectly.
It returns an error in the block's second branch statement. 

<trial Q1>
/ stimulustimes = [1=Q1]
/ correctresponse = ("2")
/ validresponse = ("1","2","3")
/ errormessage = true(Q1Incorrect,10000)
/ correctmessage = true(Q1Correct,10000)
/ recorddata = true
</trial>

<trial Q2>
/ stimulustimes = [1=Q2]
/ correctresponse = ("2")
/ validresponse = ("1","2","3")
/ errormessage = true(Q2Incorrect,10000)
/ correctmessage = true(Q2Correct,10000)
/ recorddata = true
</trial>

<trial Q3>
/ stimulustimes = [1=Q3]
/ correctresponse = ("3")
/ validresponse = ("1","2","3")
/ errormessage = true(Q3Incorrect,10000)
/ correctmessage = true(Q3Correct,10000)
/ recorddata = true
</ trial>

<block quiz>
/ trials = [1=Q1; 2=Q2; 3=Q3]
/ recorddata = true
/ screencolor = white
/ branch = [if (block.quiz.count > 3) 0]
/ branch = [if (trial.Q1.incorrect || trial.Q2.incorrect || trial.Q3.incorrect) block.quiz]
</block>

There is no such thing as an incorrect property.

<block quiz>
/ trials = [1=Q1; 2=Q2; 3=Q3]
/ recorddata = true
/ screencolor = white
/ branch = [if (block.quiz.count > 3) 0]
/ branch = [if (trial.Q1.incorrect || trial.Q2.incorrect || trial.Q3.incorrect) block.quiz]
</block>

The property you're looking for is the error property

<block quiz>
/ trials = [1=Q1; 2=Q2; 3=Q3]
/ recorddata = true
/ screencolor = white
/ branch = [if (block.quiz.count > 3) 0]
/ branch = [if (trial.Q1.error || trial.Q2.error || trial.Q3.error ) block.quiz]
</block>