multiple "success" or "failure" feedback options

PennController for IBEX Forums Support multiple "success" or "failure" feedback options

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #7965
    sharon
    Participant

    Hi Jeremy,

    I’m working on an experiment in which I will give participants feedback on their responses. They will hear an audio file and press “A” or “B” to respond. I have a column in my csv file that logs the correct answer for each trial (A or B). I would like to generate feedback after each selection that states which option they chose and if it was correct. For example, when participants press “A” and the answer is A, they should see “correct, the answer is A!” and if they press “B”, they should get “No, the answer was B”. When participants select “B” and the answer is B, they should get “Correct, the answer is B!” as a response and when they select “A” in this case, they should see “No, the answer was B”. How can I get multiple success/failure messages in response to participant selections? Thank you!

    Sharon

    #7966
    Jeremy
    Keymaster

    Hi Sharon,

    Just refer to the column of your table in the test command:

    Template( "table.csv" , row =>
      newTrial(
        newText("Press A or B").print()
        ,
        newKey("AB")
          .wait()
          .test.pressed( row.Correct )
          .success( newText("Correct, the answer is "+row.Correct+"!").print() )
          .failure( newText("No, the answer was "+row.Correct+".").print() )
        ,
        newButton("Next").print().wait()
      )
    )

    Jeremy

    #7967
    sharon
    Participant

    Thanks for the quick response!

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.