diff options
author | Prabhu Ramachandran | 2017-08-24 11:17:23 +0530 |
---|---|---|
committer | GitHub | 2017-08-24 11:17:23 +0530 |
commit | b18d7303e15d747229734eff8c1f1bd6d550efd2 (patch) | |
tree | 316cdd2264eb144ac2eff5bdd8e21f0ffb3c7f5d /yaksh/views.py | |
parent | 9dedf409a1da3c801d82a6a77d3f48f66e25264e (diff) | |
parent | d512e7c8f61155c8df43fa3b1ded8b1c3e835125 (diff) | |
download | online_test-b18d7303e15d747229734eff8c1f1bd6d550efd2.tar.gz online_test-b18d7303e15d747229734eff8c1f1bd6d550efd2.tar.bz2 online_test-b18d7303e15d747229734eff8c1f1bd6d550efd2.zip |
Merge pull request #311 from ankitjavalkar/show_enrolled_hidden_crs
Display all hidden courses with pending enrollment requests
Diffstat (limited to 'yaksh/views.py')
-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} |