From 90e8295819f606bcf794a5bcd521b4ef08cb98e0 Mon Sep 17 00:00:00 2001 From: maheshgudi Date: Fri, 13 Oct 2017 14:57:35 +0530 Subject: Sort students' name in grade user in alphabetical order --- yaksh/models.py | 1 + 1 file changed, 1 insertion(+) (limited to 'yaksh/models.py') diff --git a/yaksh/models.py b/yaksh/models.py index f7d9906..3fcfa39 100644 --- a/yaksh/models.py +++ b/yaksh/models.py @@ -1097,6 +1097,7 @@ class AnswerPaperManager(models.Manager): def get_users_for_questionpaper(self, questionpaper_id): return self._get_answerpapers_for_quiz(questionpaper_id, status=True)\ .values("user__id", "user__first_name", "user__last_name")\ + .order_by("user__first_name")\ .distinct() def get_user_all_attempts(self, questionpaper, user): -- cgit