--- a/taskapp/events/task.py Mon Mar 01 04:54:08 2010 +0530
+++ b/taskapp/events/task.py Mon Mar 01 05:18:44 2010 +0530
@@ -146,6 +146,8 @@
claim.user = user
claim.creation_datetime = datetime.now()
claim.save()
+
+ user.request_sent_to.filter(is_replied=False, is_valid=True, role="MT", task=task).update(is_valid=False)
def assignTask(task, user, assigned_by):
""" check for the status of task and assign it to the particular user """
@@ -183,13 +185,18 @@
mapobj.subs.remove(sub_task)
mapobj.save()
-def removeUser(main_task, rem_user, removed_by):
+def removeUser(main_task, rem_user, removed_by, reason=None):
""" right now, just remove the user from the list of assigned_users.
"""
main_task.assigned_users.remove(rem_user)
main_task.save()
+ ## TODiscuss : when a user is kicked off, his pending requests for pynts is made invalid
+ rem_user.request_receiving_user.filter(task=main_task,role="PY",is_valid=True,is_replied=False).update(is_valid=False)
+
+ ## TODO : create notification to the victim
+
def assignCredits(task, given_by, given_to, points):
""" make a proper request object.
"""