Separate out various boolean values in the dates_banner.html in order to make it easier to reference them
This commit is contained in:
@@ -18,19 +18,21 @@ from course_modes.models import CourseMode
|
||||
% endif
|
||||
<%
|
||||
has_locked_assignments = any(hasattr(block, 'contains_gated_content') and block.contains_gated_content for block in course_date_blocks if isinstance(block, CourseAssignmentDate)) if (course_date_blocks and on_dates_tab) else False
|
||||
on_dates_tab_as_audit = on_dates_tab and enrollment_mode == CourseMode.AUDIT
|
||||
on_dates_tab_as_verified = on_dates_tab and enrollment_mode == CourseMode.VERIFIED
|
||||
on_course_outline_page_as_audit = on_course_outline_page and enrollment_mode == CourseMode.AUDIT
|
||||
on_course_outline_page_as_verified = on_course_outline_page and enrollment_mode == CourseMode.VERIFIED
|
||||
on_courseware_page_as_audit = on_courseware_page and enrollment_mode == CourseMode.AUDIT
|
||||
on_courseware_page_as_verified = on_courseware_page and enrollment_mode == CourseMode.VERIFIED
|
||||
is_verified = enrollment_mode == CourseMode.VERIFIED
|
||||
is_audit = enrollment_mode == CourseMode.AUDIT
|
||||
on_dates_tab_as_audit = on_dates_tab and is_audit
|
||||
on_dates_tab_as_verified = on_dates_tab and is_verified
|
||||
on_course_outline_page_as_audit = on_course_outline_page and is_audit
|
||||
on_course_outline_page_as_verified = on_course_outline_page and is_verified
|
||||
on_courseware_page_as_audit = on_courseware_page and is_audit
|
||||
on_courseware_page_as_verified = on_courseware_page and is_verified
|
||||
additional_styling_class = 'on-mobile' if is_mobile_app else 'has-button'
|
||||
%>
|
||||
% if (missed_deadlines and (on_dates_tab_as_verified or on_courseware_page_as_audit or on_courseware_page_as_verified)):
|
||||
<div class="dates-banner ${additional_styling_class}">
|
||||
<div class="dates-banner-text">
|
||||
% if is_mobile_app:
|
||||
% if enrollment_mode == CourseMode.VERIFIED:
|
||||
% if is_verified:
|
||||
${_('It looks like you missed some important deadlines based on our suggested schedule. ')}
|
||||
${_('To keep yourself on track, you can update this schedule and shift the past due assignments into the future by visiting ')}
|
||||
<a class="mobile-dates-link" href="${web_app_course_url}">edx.org</a>.
|
||||
@@ -93,7 +95,7 @@ additional_styling_class = 'on-mobile' if is_mobile_app else 'has-button'
|
||||
<div class="dates-banner ${additional_styling_class}">
|
||||
<div class="dates-banner-text">
|
||||
% if is_mobile_app:
|
||||
% if enrollment_mode == CourseMode.VERIFIED:
|
||||
% if is_verified:
|
||||
${_('It looks like you missed some important deadlines based on our suggested schedule. ')}
|
||||
${_('To keep yourself on track, you can update this schedule and shift the past due assignments into the future by visiting ')}
|
||||
<a class="mobile-dates-link" href="${web_app_course_url}">edx.org</a>.
|
||||
@@ -156,7 +158,7 @@ additional_styling_class = 'on-mobile' if is_mobile_app else 'has-button'
|
||||
<div class="dates-banner ${additional_styling_class}">
|
||||
<div class="dates-banner-text">
|
||||
% if is_mobile_app:
|
||||
% if enrollment_mode == CourseMode.VERIFIED:
|
||||
% if is_verified:
|
||||
${_('It looks like you missed some important deadlines based on our suggested schedule. ')}
|
||||
${_('To keep yourself on track, you can update this schedule and shift the past due assignments into the future by visiting ')}
|
||||
<a class="mobile-dates-link" href="${web_app_course_url}">edx.org</a>.
|
||||
|
||||
Reference in New Issue
Block a user