summaryrefslogtreecommitdiff
path: root/yaksh/views.py
diff options
context:
space:
mode:
authoradityacp2020-02-28 12:05:56 +0530
committeradityacp2020-02-28 12:05:56 +0530
commitb4751e0c1783a71c6672554114ccdf5a78c6b47f (patch)
treeb1303ee3214c0e1ff0581d9ce96495c7efde6cd7 /yaksh/views.py
parent1212811391eaafb7e86a2fdc825b4b0ecc20df45 (diff)
downloadonline_test-b4751e0c1783a71c6672554114ccdf5a78c6b47f.tar.gz
online_test-b4751e0c1783a71c6672554114ccdf5a78c6b47f.tar.bz2
online_test-b4751e0c1783a71c6672554114ccdf5a78c6b47f.zip
Order courses by active courses
Diffstat (limited to 'yaksh/views.py')
-rw-r--r--yaksh/views.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/yaksh/views.py b/yaksh/views.py
index 5d26822..1ab3503 100644
--- a/yaksh/views.py
+++ b/yaksh/views.py
@@ -1237,7 +1237,7 @@ def monitor(request, quiz_id=None, course_id=None):
courses = Course.objects.filter(
Q(creator=user) | Q(teachers=user),
is_trial=False
- ).order_by("-id").distinct()
+ ).order_by("-active").distinct()
paginator = Paginator(courses, 30)
page = request.GET.get('page')
try:
@@ -1706,7 +1706,7 @@ def grade_user(request, quiz_id=None, user_id=None, attempt_number=None,
if not course_id:
courses = Course.objects.filter(
Q(creator=current_user) | Q(teachers=current_user), is_trial=False
- ).order_by("-id").distinct()
+ ).order_by("-active").distinct()
paginator = Paginator(courses, 30)
page = request.GET.get('page')
try: