PennController for IBEX › Forums › Support › Feedback after selecting an image › Reply To: Feedback after selecting an image
March 31, 2020 at 11:54 am
#4950
Elise
Participant
Hi Jermey,
last question, I promise!
Is it possible to implement response feedback with a selector element? I implemented a column (“Target”) in my csv that says what the target response (CoveredPicture / VisualPicutre) is. This is my code so far:
PennController.Template( "Filler_orig.csv" ,
row => ["filler_orig",
"DashedSentence", {s: row.Sentence},
"PennController", PennController(
defaultImage.size(400,400)
,
newImage("CoveredPicture", "covered.jpg")
,
newImage("VisualPicture", row.Picture)
,
newCanvas(800,400)
.add( -25 , 0 , newCanvas("left" , 400, 400) )
.add( 425 , 0 , newCanvas("right", 400, 400) )
.print()
.settings.log()
,
newCanvas(50,50)
.settings.add(-75,-200, newText("(F)"))
.settings.add(850,-200, newText("(J)"))
.print()
,
newVar("toggle", 1) // Initialize with value 1
.global().set( v=>v-1 ).test.is(1)
.success(
getImage("CoveredPicture").print(0,0,getCanvas("left")),
getImage( "VisualPicture").print(0,0,getCanvas("right"))
)
.failure(
getImage("CoveredPicture").print(0,0,getCanvas("right")),
getImage( "VisualPicture").print( 0,0,getCanvas("left") )
)
,
newSelector()
.settings.disableClicks()
.settings.add( getImage("CoveredPicture") , getImage("VisualPicture") )
.settings.keys( "F" , "J" )
.settings.log()
.wait()
)
.log('Condition', row.Condition)
.log('Item', row.Item)
])
I tried to work with the Var element to save the participants response, but I don’t know how to test if response and target response matches. .success / .failure are just applicable to specific elements right?
Best,
Elise