From 964506a34c92f2c8b0c6a926bd9615fa9cfa36c0 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 787daa6..4c15fce 100644 --- a/yaksh/models.py +++ b/yaksh/models.py @@ -1094,6 +1094,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