From 9aeaf153851c7821336ab542b4fd8f4e621a8d65 Mon Sep 17 00:00:00 2001 From: Akshen Date: Sat, 4 Nov 2017 13:35:36 +0530 Subject: Show Active Course on top of Courses Page --- yaksh/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'yaksh/views.py') diff --git a/yaksh/views.py b/yaksh/views.py index 47d8c9f..0d6acfe 100644 --- a/yaksh/views.py +++ b/yaksh/views.py @@ -793,9 +793,9 @@ def courses(request): if not is_moderator(user): raise Http404('You are not allowed to view this page') courses = Course.objects.filter( - creator=user, is_trial=False).order_by('-id') + creator=user, is_trial=False).order_by('-active') allotted_courses = Course.objects.filter( - teachers=user, is_trial=False).order_by('-id') + teachers=user, is_trial=False).order_by('-active') context = {'courses': courses, "allotted_courses": allotted_courses} return my_render_to_response('yaksh/courses.html', context, context_instance=ci) -- cgit