Reply To: Branching Structure for filtering participants

PennController for IBEX Forums Support Branching Structure for filtering participants Reply To: Branching Structure for filtering participants

#10703
Jeremy
Keymaster

Hi AY,

There is no .test.selected command on the Controller element (and even if there were, you would be testing the selection before it even happened because your wait command only comes later). As a matter of fact, there is no test command on the Controller element whatsoever, because it’s a native-Ibex element. My suggestion is you use the Scale element, as in my example (note that you want to remove the defaultScale commands from Header if you use the code below):

newText( row.sentence ).center().print()
,
newScale("choice", 5)
  .button()
  .keys()
  .before( newText("Grammatical") )
  .after( newText("Ungrammatical") )
  .log()
  .center()
  .print()
  .wait()
  .test.selected( row.correct_answer ).failure(getVar("error_count").set(v=>v+1))

You can play with the scale’s aesthetics by using CSS rules. See this post for a minimal example

Jeremy