summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkshen2017-11-06 15:45:21 +0530
committerAkshen2017-11-06 15:45:21 +0530
commit52afb684b1bd59cc1d5f2f1a6963b877a5604b37 (patch)
treef0131e6faf279e993151f80541945b0a55f6e07b
parent9aeaf153851c7821336ab542b4fd8f4e621a8d65 (diff)
downloadonline_test-52afb684b1bd59cc1d5f2f1a6963b877a5604b37.tar.gz
online_test-52afb684b1bd59cc1d5f2f1a6963b877a5604b37.tar.bz2
online_test-52afb684b1bd59cc1d5f2f1a6963b877a5604b37.zip
Show Latest Active Course on top of Courses Page
-rw-r--r--CHANGELOG.txt2
-rw-r--r--yaksh/views.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index ddf0953..7da93c4 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -12,7 +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.
-* Latest Course will be shown on top of Courses Page.
+* 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 0d6acfe..e2412bb 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('-active')
+ creator=user, is_trial=False).order_by('-active', '-id')
allotted_courses = Course.objects.filter(
- teachers=user, is_trial=False).order_by('-active')
+ 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)