fixed a small syntax error .
--- a/taskapp/views/task.py Wed Mar 03 11:19:42 2010 +0530
+++ b/taskapp/views/task.py Wed Mar 03 11:21:33 2010 +0530
@@ -82,10 +82,14 @@
claimed_users = task.claimed_users.all()
- task_viewable = True if ( task.status != "UP" ) or is_mentor or user.request_sent_to.filter(is_valid=True,is_replied=False,role="MT",task=task)else False
+
+ is_requested_mentor = True if user.request_sent_to.filter(is_valid=True,is_replied=False,role="MT",task=task) else False
+ task_viewable = True if ( task.status != "UP" ) or is_mentor or is_requested_mentor else False
if not task_viewable:
return show_msg(user, "You are not authorised to view this task", "/task/browse/", "browse the tasks")
+ context['is_requested_mentor'] = is_requested_mentor
+
context['can_publish'] = True if task.status == "UP" and user == task.created_by else False
context['can_edit'] = True if task.status == "UP" and is_mentor else False
context['can_close'] = True if task.status not in ["UP", "CD", "CM"] and is_mentor else False