branching if incorrect


Author
Message
anisa_khalfan
anisa_khalfan
New Member (30 reputation)New Member (30 reputation)New Member (30 reputation)New Member (30 reputation)New Member (30 reputation)New Member (30 reputation)New Member (30 reputation)New Member (30 reputation)New Member (30 reputation)
Group: Forum Members
Posts: 6, Visits: 32
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>
Dave
Dave
Supreme Being (863K reputation)Supreme Being (863K reputation)Supreme Being (863K reputation)Supreme Being (863K reputation)Supreme Being (863K reputation)Supreme Being (863K reputation)Supreme Being (863K reputation)Supreme Being (863K reputation)Supreme Being (863K reputation)
Group: Administrators
Posts: 10K, Visits: 60K
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>
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search