refactor: Switch to using course_overview start and end everywhere
In DE-1822, we believed we needed to switch to start_date and end_date. It was determined this was not the case, so this updates the comment to ensure future users use the correct fields (start and end) and updates any pieces of code that may have used start_date or end_date.
This commit is contained in:
@@ -107,7 +107,7 @@ class FinancialAssistanceTool(CourseTool):
|
||||
return False
|
||||
|
||||
# hide link for archived courses
|
||||
if course_overview is not None and course_overview.end_date is not None and now > course_overview.end_date:
|
||||
if course_overview is not None and course_overview.end is not None and now > course_overview.end:
|
||||
return False
|
||||
|
||||
# hide link if not logged in or user not enrolled in the course
|
||||
|
||||
@@ -179,7 +179,7 @@ class FinancialAssistanceToolTest(SharedModuleStoreTestCase):
|
||||
assert not FinancialAssistanceTool().is_enabled(self.request, self.course.id)
|
||||
|
||||
def test_tool_not_visible_when_end_date_passed(self):
|
||||
self.course_overview.end_date = self.now - datetime.timedelta(days=30)
|
||||
self.course_overview.end = self.now - datetime.timedelta(days=30)
|
||||
self.course_overview.save()
|
||||
assert not FinancialAssistanceTool().is_enabled(self.request, self.course_overview.id)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user