NYUCCL / psiTurk

An open platform for science on Amazon Mechanical Turk.
https://psiturk.org
MIT License
277 stars 140 forks source link

Example experiment: Bug in resubmit function? #265

Open ariekahn opened 7 years ago

ariekahn commented 7 years ago

In the stroop example task.js, the questionnaire calls psiTurk.completeHIT() once the bonus computation is successful. If it fails though, resubmit() tries to resend the data, and once successful, calls finish() instead, which looks like a holdover from an earlier version of the code.

Should resubmit() be calling psiTurk.completeHIT() as well?

first try

psiTurk.computeBonus('compute_bonus', function() { psiTurk.completeHIT(); }); 

resubmit

psiTurk.computeBonus('compute_bonus', function(){ finish() }); 
deargle commented 7 years ago

Probably. There's some weird stuff in that whole "try again" bit. I suppose it just never fails the first time so that code is never reached, so no one has complained. Will patch though with your PR.