removed quiz links from view event template .
--- a/feedback/views.py Tue Apr 13 15:15:13 2010 +0530
+++ b/feedback/views.py Tue Apr 13 16:29:58 2010 +0530
@@ -51,5 +51,16 @@
""" print a list of all the feedbacks collected.
"""
- feeds = Feedback.objects.all()
+ user = request.user
+
+ try:
+ event = Event.objects.get(key__iexact=event_key)
+ except Event.DoesNotExist:
+ raise Http404
+
+ if not user in event.organizers.all():
+ raise Http404
+
+ feeds = Feedback.objects.filter(event=event)
return render_to_response('list_feedbacks.html',{'feeds':feeds})
+
--- a/templates/view_event.html Tue Apr 13 15:15:13 2010 +0530
+++ b/templates/view_event.html Tue Apr 13 16:29:58 2010 +0530
@@ -24,25 +24,25 @@
{% endif %}
{% if is_org %}
- <a href="/reg/event/attendees/{{event.key}}">Click here</a> to view list of people registered for the workshop. <br />
- <a href="/feedback/list/{{event.key}}">Click here</a> to see the feedbacks that we submitted.<br /><br />
+ <a href="/reg/event/attendees/{{event.key}}">View list of people registered for the workshop</a> <br />
+ <a href="/feedback/list/{{event.key}}">View submitted feedbacks</a><br /><br />
{% if user.is_staff %}
{% if event.registration_is_open %}
- <a href="/reg/event/registration/close/{{event.key}}">Click here</a> to close the registration.<br />
+ <a href="/reg/event/registration/close/{{event.key}}">Close the registration</a><br />
{% else %}
- <a href="/reg/event/registration/open/{{event.key}}">Click here</a> to open the registration.<br />
+ <a href="/reg/event/registration/open/{{event.key}}">Open the registration</a><br />
{% endif %}
-
+<!--
{% ifequal event.quiz_status "00" %}
<a href="/reg/event/quiz/open/{{event.key}}">Click here</a> to open quiz.<br />
{% else %}
<a href="/reg/event/registration/close/{{event.key}}">Click here</a> to close the registration.<br />
{% endifequal %}
-
+ -->
{% ifequal event.feedback_status "0" %}
- <a href="/reg/event/feedback/open/{{event.key}}">Click here</a> to open the feedback.<br />
+ <a href="/reg/event/feedback/open/{{event.key}}">Open feedback</a><br />
{% else %}
- <a href="/reg/event/feedback/close/{{event.key}}">Click here</a> to close the feedback for day {{event.feedback_status}}.<br />
+ <a href="/reg/event/feedback/close/{{event.key}}">Close the feedback for day {{event.feedback_status}}</a><br />
{% endifequal %}
{% endif %}
{% endif %}