summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPalaparthy Adityachandra2022-03-31 13:27:20 +0530
committerGitHub2022-03-31 13:27:20 +0530
commit9ea045b637f2087c1f1cdf8855d2d42b5f74a875 (patch)
treefc6c19ba8a22490c23d9c3eed8a3e2b026bf3289
parent88866259d77c01c50c274fed700289144ccabec5 (diff)
parent92b9697b2f209b37b87ed62612d20b861a666be3 (diff)
downloadonline_test-9ea045b637f2087c1f1cdf8855d2d42b5f74a875.tar.gz
online_test-9ea045b637f2087c1f1cdf8855d2d42b5f74a875.tar.bz2
online_test-9ea045b637f2087c1f1cdf8855d2d42b5f74a875.zip
Merge pull request #859 from CruiseDevice/fix-course-visibilityHEADmaster
show active course on search sorted by start_enroll_time
-rw-r--r--yaksh/models.py4
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')
#############################################################################