From 661933dc2d7351b52bfd8b599bd0f8ba700f3b4a Mon Sep 17 00:00:00 2001 From: Prabhu Ramachandran Date: Sat, 26 Nov 2011 09:59:55 +0530 Subject: BUG: Monitor was not showing sorted results. --- exam/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exam/views.py b/exam/views.py index 61179de..98fe7c7 100644 --- a/exam/views.py +++ b/exam/views.py @@ -285,7 +285,7 @@ def monitor(request, quiz_id=None): papers = QuestionPaper.objects.filter(quiz=quiz, user__profile__isnull=False) - sorted(papers, + papers = sorted(papers, cmp=lambda x, y: cmp(x.get_total_marks(), y.get_total_marks()), reverse=True) -- cgit