Set missed_deadlines in the course outlines template to simplify the logic in the dates_banner.html

This commit is contained in:
Calen Pennington
2020-05-28 14:47:13 -04:00
parent 0a691f244f
commit 6f568d097c
3 changed files with 7 additions and 15 deletions

View File

@@ -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>

View File

@@ -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)