diff options
author | Palaparthy Adityachandra | 2022-03-31 13:27:20 +0530 |
---|---|---|
committer | GitHub | 2022-03-31 13:27:20 +0530 |
commit | 9ea045b637f2087c1f1cdf8855d2d42b5f74a875 (patch) | |
tree | fc6c19ba8a22490c23d9c3eed8a3e2b026bf3289 | |
parent | 88866259d77c01c50c274fed700289144ccabec5 (diff) | |
parent | 92b9697b2f209b37b87ed62612d20b861a666be3 (diff) | |
download | online_test-9ea045b637f2087c1f1cdf8855d2d42b5f74a875.tar.gz online_test-9ea045b637f2087c1f1cdf8855d2d42b5f74a875.tar.bz2 online_test-9ea045b637f2087c1f1cdf8855d2d42b5f74a875.zip |
show active course on search sorted by start_enroll_time
-rw-r--r-- | yaksh/models.py | 4 |
1 files changed, 3 insertions, 1 deletions
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') ############################################################################# |