PennController.SendResults() (since PennController 1.1)
PennController.SendResults( "label" ) (since PennController 1.1)
Since PennController 1.7,
SendResults can be used in three different environments:
- On its own, it creates a trial whose sole function will be to send the results to the server when it is run. You can give a label to the trial by passing a string as an argument to
SendResultsand then refer to it in
Sequencein order to send the results early.
- Alternatively, you can use it directly inside
Sequencein place of a reference to a label, with the same effect as above (but lifting the need to come up with a dedicated label)
SendResults()can also be used as a command inside a trial: when it is run, it will send the results to the server. This is useful if you want to allow your participants to send their results early for some reason.
Sending the results early is useful if you want your participants to see a confirmation screen at the end.
Sequence( "hello" , "world" , SendResults() , "bye" ) newTrial( "hello" , newButton("Hello") .settings.log() .print() .wait() ) newTrial( "world" , newButton("Send & quit now") .settings.callback( getButton("World") .remove() , SendResults() ) .print( 10 , 10 ) , newButton("World") .settings.log() .print() .wait() ) newTrial( "bye" , newText("thanks", "Thank your for participating in this experiment.") .print() , newText("link", "<a href='.'>Click here to confirm your participation.</a>") .print() , newTimer("forever", 1) .wait() // Timer never started: will wait forever ) .setOption("countsForProgressBar",false)