Use a standard function to find out if a course has ended
This commit is contained in:
@@ -794,7 +794,7 @@ class TestProgramDataExtender(ModuleStoreTestCase):
|
||||
'certificate_url': None,
|
||||
'course_url': reverse('course_root', args=[self.course.id]),
|
||||
'enrollment_open_date': strftime_localized(DEFAULT_ENROLLMENT_START_DATE, 'SHORT_DATE'),
|
||||
'is_course_ended': self.course.end and self.course.end < datetime.datetime.now(utc),
|
||||
'is_course_ended': self.course.has_ended(),
|
||||
'is_enrolled': False,
|
||||
'is_enrollment_open': True,
|
||||
'upgrade_url': None,
|
||||
|
||||
@@ -101,7 +101,7 @@ class CourseOutlineFragmentView(EdxFragmentView):
|
||||
'on_course_outline_page': True,
|
||||
'missed_deadlines': missed_deadlines,
|
||||
'missed_gated_content': missed_gated_content,
|
||||
'is_archived': course.end and course.end < datetime.now(),
|
||||
'has_ended': course.has_ended(),
|
||||
}
|
||||
|
||||
html = render_to_string('course_experience/course-outline-fragment.html', context)
|
||||
|
||||
Reference in New Issue
Block a user