Reply To: Randomly selecting one comprehension question

PennController for IBEX Forums Support Randomly selecting one comprehension question Reply To: Randomly selecting one comprehension question

#7467
Jeremy
Keymaster

Hello Marisol,

Here is a suggestion:

var n_question = 1;
Template("myTable.csv", row =>
  newTrial("experimento",
    newText("*").center().css("font.size", "x-large").print()
    ,
    newKey(" ").wait().log("all").disable()
    ,
    getText("*").remove()
    ,
    newController("DashedSentence", {s : row.Oracion}).center().print().wait().remove()
    ,
    n_question = 1+Math.floor(Math.random()*4)
    ,
    newText("q", row['Q'+n_question])
      .center()
      .print()
    ,
    newKey("pressOnArrow", "ArrowLeft", "ArrowRight").log().wait()
  )
  .log("n_question", n_question)
  .log("question", row['Q'+n_question])
)

Jeremy