Set missed_deadlines in the course outlines template to simplify the logic in the dates_banner.html
This commit is contained in:
@@ -27,7 +27,7 @@ dates_banner_displayed = False
|
||||
%>
|
||||
<main role="main" class="course-outline" id="main" tabindex="-1">
|
||||
<div class="dates-banner-wrapper">
|
||||
% if enrollment_mode and relative_dates_flag_is_enabled and self_paced and not is_course_staff:
|
||||
% if relative_dates_flag_is_enabled and self_paced and not is_course_staff:
|
||||
<%include file="/dates_banner.html" />
|
||||
% endif
|
||||
</div>
|
||||
|
||||
@@ -112,6 +112,9 @@ class CourseOutlineFragmentView(EdxFragmentView):
|
||||
user=request.user,
|
||||
course_key=course_key
|
||||
)
|
||||
# We use javascript to check whether to actually display this banner, so we let the banner assume
|
||||
# that deadlines have been missed.
|
||||
context['missed_deadlines'] = True
|
||||
|
||||
html = render_to_string('course_experience/course-outline-fragment.html', context)
|
||||
return Fragment(html)
|
||||
|
||||
Reference in New Issue
Block a user