Reply To: Can we randomize time with newTimer() ?

PennController for IBEX Forums Support Can we randomize time with newTimer() ? Reply To: Can we randomize time with newTimer() ?


would it be possible to show them how much time they’ve spent on the practice trial as well as their accuracy? If so, how?

EDIT: I just saw your new message, which asks about average response time per practice trial rather than time spent on the whole practice block. I’ll address that later

You could add this at the end of your keyboard_warning trial, after getText("keyboard-text").remove(): newVar("startPractice").global().set(()=>

Then before the test on your Key element in the code of your practice trials, add newVar("accurate", []).global() and inside the success and failure commands, add getVar("accurate").set(v=>[...v,true])/getVar("accurate").set(v=>[...v,false]) (respectively)

You can add a trial before instructions_E that would do something like:

  newVar("timeText").set( getVar("startPractice").global() ).set(v=> "You spent "+Math.round(("min practicing" ),
  newText( "feedbackTime" ).text( getVar("timeText") ).print()
  newVar("accuracyText").set( getVar("accurate").global() ).set(v=> "You got "+v.filter(a=>a==true).length+" correct answers out of "+v.length ),
  newText( "feedbackAccuracy" ).text( getVar("accuracyText") ).print()