now opening and closing of feedback quiz and registration can be done only by staff users .
authornishanth
Tue, 13 Apr 2010 14:54:06 +0530
changeset 28 14c5ccb18159
parent 27 ea6aef4b379d
child 29 5fb4edd157e1
now opening and closing of feedback quiz and registration can be done only by staff users .
reg/views.py
--- a/reg/views.py	Tue Apr 13 14:51:22 2010 +0530
+++ b/reg/views.py	Tue Apr 13 14:54:06 2010 +0530
@@ -247,9 +247,9 @@
     except Event.DoesNotExist:
         return redirect("/reg")
 
-    is_org = True if user in event.organizers.all() else False
+    can_do_this = True if user in event.organizers.all() and user.is_staff else False
 
-    if is_org and event.feedback_status == '0':
+    if can_do_this and event.feedback_status == '0':
         #days = event.stop_date.day() - event.start_date.day() + 1
         days = 2
         if request.method == "POST":