summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--yaksh/views.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/yaksh/views.py b/yaksh/views.py
index c10ba6a..f6adb2e 100644
--- a/yaksh/views.py
+++ b/yaksh/views.py
@@ -143,7 +143,11 @@ def quizlist_user(request, enrolled=None):
courses = user.students.all()
title = 'Enrolled Courses'
else:
- courses = Course.objects.filter(active=True, is_trial=False, hidden=False)
+ courses = Course.objects.filter(
+ active=True, is_trial=False
+ ).exclude(
+ ~Q(requests=user), ~Q(rejected=user), hidden=True
+ )
title = 'All Courses'
context = {'user': user, 'courses': courses, 'title': title}