@@ -567,19 +567,20 @@ def worker_bonus(self, chosenHit, auto, amount, reason, assignment_ids = None):
567567 init_db ()
568568 part = Participant .query .\
569569 filter (Participant .assignmentid == assignmentID ).\
570+ filter (Participant .endhit != None ).\
570571 one ()
571572 if auto :
572573 amount = part .bonus
573574 status = part .status
574575 if amount <= 0 :
575576 print "bonus amount <=$0, no bonus given to" , assignmentID
576- elif status == 6 and not overrideStatus :
577+ elif status == 7 and not overrideStatus :
577578 print "bonus already awarded to " , assignmentID
578579 else :
579580 success = self .amt_services .bonus_worker (assignmentID , amount , reason )
580581 if success :
581582 print "gave bonus of $" + str (amount ) + " to " + assignmentID
582- part .status = 6
583+ part .status = 7
583584 db_session .add (part )
584585 db_session .commit ()
585586 db_session .remove ()
@@ -1299,7 +1300,7 @@ def do_hit(self, arg):
12991300 """
13001301 Usage:
13011302 hit create [<numWorkers> <reward> <duration>]
1302- hit extend <HITid> [--assignments <number>] [--expiration <minutes>]
1303+ hit extend <HITid> [( --assignments <number>) ] [( --expiration <minutes>) ]
13031304 hit expire (--all | <HITid> ...)
13041305 hit dispose (--all | <HITid> ...)
13051306 hit list [--active | --reviewable]
@@ -1337,7 +1338,7 @@ def do_worker(self, arg):
13371338 worker reject (--hit <hit_id> | <assignment_id> ...)
13381339 worker unreject (--hit <hit_id> | <assignment_id> ...)
13391340 worker bonus (--amount <amount> | --auto) (--hit <hit_id> | <assignment_id> ...)
1340- worker list [--submitted | --approved | --rejected] [--hit <hit_id>]
1341+ worker list [--submitted | --approved | --rejected] [( --hit <hit_id>) ]
13411342 worker help
13421343 """
13431344 if arg ['approve' ]:
@@ -1414,7 +1415,7 @@ def run(cabinmode=False, script=None):
14141415 print colorize ('\n ' .join (['libedit version of readline detected.' ,
14151416 'readline will not be well behaved, which may cause all sorts' ,
14161417 'of problems for the psiTurk shell. We highly recommend installing' ,
1417- 'the gnu version of readline by running "sudo easy_install -a readline ".' ,
1418+ 'the gnu version of readline by running "sudo pip install gnureadline ".' ,
14181419 'Note: "pip install readline" will NOT work because of how the OSX' ,
14191420 'pythonpath is structured.' ]), 'red' , False )
14201421 sys .argv = [sys .argv [0 ]] # drop arguments which were already processed in command_line.py
0 commit comments