PennController for IBEX › Forums › Support › Conditional training phase › Reply To: Conditional training phase
July 27, 2021 at 11:30 am
#7129
Participant
Hello Jeremy,
I’m sorry I don’t if I can continue this thread with a similar issue.
I’m trying to ascreening test for my experiment where participants will have to score at 70% in an easy English test. If they do not reach this threshold they are not allowed to continue the experiment. I’m having problems even with calculating the test score.
AddTable("LEX",`WORDS,RES
PLATERY,F
DENIAL,J
GENERIC,J
MENSIBLE,F
SCORNFUL,J
STOUTLY,J
ABLAZE,J
JERMSHAW,F')
Template("LEX", row=>
newTrial("Engl_prof",
newVar("score", 0).global(),
newText(row.WORDS).print("center at 50vw","middle at 50vh"),
,
newText("<span style='color:red'><b>F = it doesn't exist</span></b>, <span style='color:green'><b>J = it exists</span></b>").print("center at 50vw","middle at 75vh"),
newKey("lext","FJ")
.wait()
.log()
.callback(
getKey("lext")
.test.pressed(row.RES)
.success(getVar("score").set(v=>v+1))
))
),
newTrial("resul",
newVar("score").global(),
newText("yscore")
.before(newText("Your score is: "))
.text(getVar("score"))
.after(newText("/60"))
.print(),
newButton("Ok").print().wait(),
newVar("score").global(),
getVar("score").test.is( v => v > 41 )
.success(end)
.failure(newText("I'm sorry but your score is too low. You cannot continue the experiment.").print().wait())
)
I saw that you explained this method somewhere else, but I cannot figure out the problem.
Best,
Giorgio