From 92b9697b2f209b37b87ed62612d20b861a666be3 Mon Sep 17 00:00:00 2001 From: CruiseDevice Date: Wed, 30 Mar 2022 17:36:11 +0530 Subject: show active course on search sorted by start_enroll_time --- yaksh/models.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/yaksh/models.py b/yaksh/models.py index 8e5562b..c27f31c 100644 --- a/yaksh/models.py +++ b/yaksh/models.py @@ -297,7 +297,9 @@ class CourseManager(models.Manager): return trial_course def get_hidden_courses(self, code): - return self.filter(code=code, hidden=True) + return self.filter( + code=code, hidden=True, active=True + ).order_by('start_enroll_time') ############################################################################# -- cgit