summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author2017-05-25 13:09:12 +0530
committer2017-05-25 13:09:12 +0530
commit29d21f48f1392cd00ddef6a3be3531c58b2a8770 (patch)
treeed0b07209652e6ce67f8ef9a4a8e9e65f46eb9c2
parent261a83ecd9e733b757c24aeffb410634082512a4 (diff)
downloadonline_test-29d21f48f1392cd00ddef6a3be3531c58b2a8770.tar.gz
online_test-29d21f48f1392cd00ddef6a3be3531c58b2a8770.tar.bz2
online_test-29d21f48f1392cd00ddef6a3be3531c58b2a8770.zip
Add check for verifying moderator
-rw-r--r--yaksh/views.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/yaksh/views.py b/yaksh/views.py
index eb7a103..5c52fa7 100644
--- a/yaksh/views.py
+++ b/yaksh/views.py
@@ -1070,7 +1070,6 @@ def user_data(request, user_id, questionpaper_id=None):
return my_render_to_response('yaksh/user_data.html', context,
context_instance=RequestContext(request))
-
@login_required
@email_verified
def download_csv(request, questionpaper_id):
@@ -1545,6 +1544,8 @@ def update_email(request):
@email_verified
def download_assignment_file(request, quiz_id, question_id=None, user_id=None):
user = request.user
+ if not is_moderator(user):
+ raise Http404("You are not allowed to view this page")
qp = QuestionPaper.objects.get(quiz_id=quiz_id)
assignment_files, file_name = AssignmentUpload.objects.get_assignments(qp,
question_id,