summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.txt1
-rw-r--r--yaksh/views.py6
2 files changed, 5 insertions, 2 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index ab9e4b2..7da93c4 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -12,6 +12,7 @@
* Fixed a bug that did not allow expected input in Standard I/O type question to be none.
* UI changes in grade user, view answerpaper and monitor pages.
* Fixed a bug that would require shebang to be put in for Bash assertion based questions.
+* Updated Courses Page to show Active Courses on top.
=== 0.6.0 (11-05-2017) ===
diff --git a/yaksh/views.py b/yaksh/views.py
index c50ba33..63da956 100644
--- a/yaksh/views.py
+++ b/yaksh/views.py
@@ -792,8 +792,10 @@ def courses(request):
ci = RequestContext(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)
- allotted_courses = Course.objects.filter(teachers=user, is_trial=False)
+ courses = Course.objects.filter(
+ creator=user, is_trial=False).order_by('-active', '-id')
+ allotted_courses = Course.objects.filter(
+ teachers=user, is_trial=False).order_by('-active', '-id')
context = {'courses': courses, "allotted_courses": allotted_courses}
return my_render_to_response('yaksh/courses.html', context,
context_instance=ci)