summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorankitjavalkar2018-07-24 19:52:44 +0530
committerankitjavalkar2019-01-14 13:00:10 +0530
commitaf4e2b312bc22b1be3a9c8f851a48a5dd3d90997 (patch)
treeeefcfebb5820fe70c2e413a7ac8c3dc19d9f21c7
parent567502f4376fe5a167d172bfcd08cf0ae4ac4caf (diff)
downloadonline_test-af4e2b312bc22b1be3a9c8f851a48a5dd3d90997.tar.gz
online_test-af4e2b312bc22b1be3a9c8f851a48a5dd3d90997.tar.bz2
online_test-af4e2b312bc22b1be3a9c8f851a48a5dd3d90997.zip
Bug Fix: Fetch only distinct values for courses where User is Creator OR Teacher
-rw-r--r--yaksh/views.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/yaksh/views.py b/yaksh/views.py
index de6a1a2..2d69fa2 100644
--- a/yaksh/views.py
+++ b/yaksh/views.py
@@ -383,7 +383,7 @@ def prof_manage(request, msg=None):
if not is_moderator(user):
return my_redirect('/exam/')
courses = Course.objects.filter(Q(creator=user) | Q(teachers=user),
- is_trial=False)
+ is_trial=False).distinct()
trial_paper = AnswerPaper.objects.filter(
user=user, question_paper__quiz__is_trial=True,
course__is_trial=True