PennController for IBEX › Forums › Support › Branching Structure for filtering participants › Reply To: Branching Structure for filtering participants
June 23, 2023 at 12:23 am
#10701
Participant
Hi, can I also continue asking a question.
I have tried to incorporate your suggestion to the template for my filler items. And I prepared the following code, which does not seem to be the right answer unfortunately.
Can you tell me how I fix this?
Best,
AY
——————————————————-
Template(
"filler.csv" //File containing the filler items, which has the column "correct_answer" to specify the true answer for the dummy element.
, row =>
newTrial(
row.type
, newText("instruction", "Press the space key to continue.")
.center()
.print()
, newKey(" ")
.wait()
, getText("instruction")
.remove()
, newController("AcceptabilityJudgment", {s : row.sentence
, presentAsScale: true
, as: [["1", "1"], ["2", "2"], ["3", "3"], ["4", "4"], ["5", "5"]]
, showNumbers: false
, hasCorrect: Number(row.correct_answer)
, randomOrder: false
, leftComment: "Grammatical"
, rightComment: "Ungrammatical"
})
.test.selected(row.correct_answer).failure(getVar("error_count").set(v=>v+1)) // I added the test command here, but this does not seem to be the right solution... (without this command, the experiment is successfully implemented.
.css("text-align", "center")
.center()
.print()
.log()
.wait()
)
.log("item", row.item)
.log("cond", row.cond)
.log("group", row.group)
.log("id", getVar("ID"))
);