diff options
Diffstat (limited to 'yaksh')
-rw-r--r-- | yaksh/views.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/yaksh/views.py b/yaksh/views.py index 7f907aa..248a333 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} |