@@ -567,19 +567,20 @@ def worker_bonus(self, chosenHit, auto, amount, reason, assignment_ids = None):
567
567
init_db ()
568
568
part = Participant .query .\
569
569
filter (Participant .assignmentid == assignmentID ).\
570
+ filter (Participant .endhit != None ).\
570
571
one ()
571
572
if auto :
572
573
amount = part .bonus
573
574
status = part .status
574
575
if amount <= 0 :
575
576
print "bonus amount <=$0, no bonus given to" , assignmentID
576
- elif status == 6 and not overrideStatus :
577
+ elif status == 7 and not overrideStatus :
577
578
print "bonus already awarded to " , assignmentID
578
579
else :
579
580
success = self .amt_services .bonus_worker (assignmentID , amount , reason )
580
581
if success :
581
582
print "gave bonus of $" + str (amount ) + " to " + assignmentID
582
- part .status = 6
583
+ part .status = 7
583
584
db_session .add (part )
584
585
db_session .commit ()
585
586
db_session .remove ()
@@ -1299,7 +1300,7 @@ def do_hit(self, arg):
1299
1300
"""
1300
1301
Usage:
1301
1302
hit create [<numWorkers> <reward> <duration>]
1302
- hit extend <HITid> [--assignments <number>] [--expiration <minutes>]
1303
+ hit extend <HITid> [( --assignments <number>) ] [( --expiration <minutes>) ]
1303
1304
hit expire (--all | <HITid> ...)
1304
1305
hit dispose (--all | <HITid> ...)
1305
1306
hit list [--active | --reviewable]
@@ -1337,7 +1338,7 @@ def do_worker(self, arg):
1337
1338
worker reject (--hit <hit_id> | <assignment_id> ...)
1338
1339
worker unreject (--hit <hit_id> | <assignment_id> ...)
1339
1340
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>) ]
1341
1342
worker help
1342
1343
"""
1343
1344
if arg ['approve' ]:
@@ -1414,7 +1415,7 @@ def run(cabinmode=False, script=None):
1414
1415
print colorize ('\n ' .join (['libedit version of readline detected.' ,
1415
1416
'readline will not be well behaved, which may cause all sorts' ,
1416
1417
'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 ".' ,
1418
1419
'Note: "pip install readline" will NOT work because of how the OSX' ,
1419
1420
'pythonpath is structured.' ]), 'red' , False )
1420
1421
sys .argv = [sys .argv [0 ]] # drop arguments which were already processed in command_line.py
0 commit comments