Skip to content

Commit bbf91f6

Browse files
For FIN.CFx always show same status Enrollment by Eligibility (#5465)
Co-authored-by: Muhammad Anas <88967643+Anas12091101@users.noreply.github.com>
1 parent 70b79c4 commit bbf91f6

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ MAILGUN_FROM_EMAIL=
2121
MAILGUN_URL=
2222
OPENSEARCH_INDEX=
2323
OPENSEARCH_INDEXING_CHUNK_SIZE=100
24+
ENROLLMENT_BY_ELIGIBILITY_COURSES=["FIN.CFx"]

courses/models.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,10 @@ def enrollment_text(self):
138138
information about the course.
139139
"""
140140
course_run = self.first_unexpired_run()
141+
142+
if self.course_number in settings.ENROLLMENT_BY_ELIGIBILITY_COURSES:
143+
return "Enrollment by Eligibility"
144+
141145
if not course_run or not course_run.start_date:
142146
promised_run = self.get_promised_run()
143147
if promised_run:

micromasters/settings.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,9 @@
434434
CORS_ORIGIN_WHITELIST = get_list_of_str("MICROMASTERS_CORS_ORIGIN_WHITELIST", [])
435435
CORS_ALLOW_CREDENTIALS = True
436436

437+
# Finance program specific message for course status Enrollment by Eligibility
438+
ENROLLMENT_BY_ELIGIBILITY_COURSES = get_list_of_str('ENROLLMENT_BY_ELIGIBILITY_COURSES', [ "FIN.CFx" ])
439+
437440
# server-status
438441
STATUS_TOKEN = get_string("STATUS_TOKEN", "")
439442
HEALTH_CHECK = ['CELERY', 'REDIS', 'POSTGRES', 'OPEN_SEARCH']

0 commit comments

Comments
 (0)