summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormahesh2016-05-04 16:33:18 +0530
committermahesh2016-05-04 16:33:18 +0530
commitf150f1c54ee5941d72f2e4057af8c90cca588292 (patch)
treea9db341f13abdf47f994d8823f233219561dbff2
parent9dd0bc4a93d2a45381d4c6829c272b9d14a95462 (diff)
downloadonline_test-f150f1c54ee5941d72f2e4057af8c90cca588292.tar.gz
online_test-f150f1c54ee5941d72f2e4057af8c90cca588292.tar.bz2
online_test-f150f1c54ee5941d72f2e4057af8c90cca588292.zip
teachers added to course can grade user
-rw-r--r--yaksh/views.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/yaksh/views.py b/yaksh/views.py
index 9be2c02..a91da29 100644
--- a/yaksh/views.py
+++ b/yaksh/views.py
@@ -893,7 +893,8 @@ def grade_user(request, quiz_id=None, user_id=None, attempt_number=None):
ci = RequestContext(request)
if not current_user.is_authenticated() or not is_moderator(current_user):
raise Http404('You are not allowed to view this page!')
- course_details = Course.objects.filter(creator=current_user)
+ course_details = Course.objects.filter(Q(creator=current_user)|
+ Q(teachers=current_user)).distinct()
context = {"course_details": course_details}
if quiz_id is not None:
questionpaper_id = QuestionPaper.objects.filter(quiz_id=quiz_id)\