Conditional branching


Author
Message
Nick Riches
Nick Riches
Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)
Group: Forum Members
Posts: 19, Visits: 69
Hi. I am trying to get a conditional branch to work. 3 sentences are presented. For only some of the sentences there is a comprehension question. I've tried to achieve this using a conditional statement so that the question trial is triggered only when the question item is not an empty string (/ branch = [if(text.question != "")trial.questionTrial]). However, the question trial is triggered all the time.

Is there a problem with my conditional statement?

Thanks

Nick




<item sentences>
/ 1 = "A dog is a canine"
/ 2 = "A cat is a feline"
/ 3 = "A bear is ursine"
</item>

<item questions>
/ 1 = ""
/ 2 = "Did this sentence mention a cat?"
/ 3 = ""
</item>

<text sentence>
/ items = sentences
/ select = sequence
</text>

<text question>
/ items = questions
/ select = text.sentence.currentindex
</text>

<trial sentenceTrial>
/ stimulusframes = [1 = sentence]
/ validresponse = ("Y", "N")
/ branch = [if(text.question != "")trial.questionTrial]
</trial>

<trial questionTrial>
/ stimulusframes = [1 = question]
/ validresponse = ("Y", "N")
</trial>

<block block>
/ trials = [1-3 = sentenceTrial]
</block>

<expt expt>
/ blocks = [1 = block]
</expt>


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Nick Riches - 8 Years Ago
Dave - 8 Years Ago
Nick Riches - 8 Years Ago
Dave - 8 Years Ago
                     + x [quote] [b] Dave - Wednesday, November 22, 2017 [/b]...
Nick Riches - 8 Years Ago

Reading This Topic

Explore
Messages
Mentions
Search