From 9a604658743c859ad5daead0b96dc7155565a702 Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Thu, 28 May 2020 11:34:55 -0400 Subject: [PATCH] Split separate dates-banner conditions into multiple copies of the same code --- lms/templates/dates_banner.html | 129 +++++++++++++++++++++++++++++++- 1 file changed, 128 insertions(+), 1 deletion(-) diff --git a/lms/templates/dates_banner.html b/lms/templates/dates_banner.html index 04bfb811b4..b79ccb4c3f 100644 --- a/lms/templates/dates_banner.html +++ b/lms/templates/dates_banner.html @@ -26,7 +26,7 @@ on_courseware_page_as_audit = on_courseware_page and enrollment_mode == CourseMo on_courseware_page_as_verified = on_courseware_page and enrollment_mode == CourseMode.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)) or (on_dates_tab_as_audit and has_locked_assignments) or on_course_outline_page_as_audit or on_course_outline_page_as_verified: +% if (missed_deadlines and (on_dates_tab_as_verified or on_courseware_page_as_audit or on_courseware_page_as_verified)):
% if is_mobile_app: @@ -89,4 +89,131 @@ additional_styling_class = 'on-mobile' if is_mobile_app else 'has-button'
% endif
+% elif (on_dates_tab_as_audit and has_locked_assignments): +
+
+ % if is_mobile_app: + % if enrollment_mode == CourseMode.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 ')} + edx.org. + ${_(' Don’t worry—you won’t lose any of the progress you’ve made when you shift your due dates.')} + % else: + ${_('You are auditing this course,')} + ${_(' which means that you are unable to participate in graded assignments.')} + ${_(' It looks like you missed some important deadlines based on our suggested schedule. To complete graded assignments as part of this course and shift the past due assignments into the future, you can upgrade today by visiting ')} + edx.org. + % endif + % else: + % if on_course_outline_page_as_verified or (missed_deadlines and (on_dates_tab_as_verified or on_courseware_page_as_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. Don’t worry—you won’t lose any of the progress you’ve made when you shift your due dates.')} + % endif + % if (on_dates_tab_as_audit and has_locked_assignments) or on_course_outline_page_as_audit or (on_courseware_page_as_audit and missed_deadlines): + ${_('You are auditing this course,')} + ${_(' which means that you are unable to participate in graded assignments.')} + % if on_dates_tab: + % if missed_deadlines: + ${_(' It looks like you missed some important deadlines based on our suggested schedule. To complete graded assignments as part of this course and shift the past due assignments into the future, you can upgrade today.')} + % else: + ${_(' To complete graded assignments as part of this course, you can upgrade today.')} + % endif + % else: + ${_(' It looks like you missed some important deadlines based on our suggested schedule. To complete graded assignments as part of this course and shift the past due assignments into the future, you can upgrade today.')} + % endif + % endif + % endif +
+ % if not is_mobile_app: +
+ % if on_course_outline_page_as_verified or (missed_deadlines and (on_dates_tab_as_verified or on_courseware_page_as_verified)): +
+ + + + +
+ % endif: + % if (on_dates_tab_as_audit and has_locked_assignments) or on_course_outline_page_as_audit or (on_courseware_page_as_audit and missed_deadlines): + + + + % endif +
+ % endif +
+% elif on_course_outline_page_as_audit or on_course_outline_page_as_verified: +
+
+ % if is_mobile_app: + % if enrollment_mode == CourseMode.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 ')} + edx.org. + ${_(' Don’t worry—you won’t lose any of the progress you’ve made when you shift your due dates.')} + % else: + ${_('You are auditing this course,')} + ${_(' which means that you are unable to participate in graded assignments.')} + ${_(' It looks like you missed some important deadlines based on our suggested schedule. To complete graded assignments as part of this course and shift the past due assignments into the future, you can upgrade today by visiting ')} + edx.org. + % endif + % else: + % if on_course_outline_page_as_verified or (missed_deadlines and (on_dates_tab_as_verified or on_courseware_page_as_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. Don’t worry—you won’t lose any of the progress you’ve made when you shift your due dates.')} + % endif + % if (on_dates_tab_as_audit and has_locked_assignments) or on_course_outline_page_as_audit or (on_courseware_page_as_audit and missed_deadlines): + ${_('You are auditing this course,')} + ${_(' which means that you are unable to participate in graded assignments.')} + % if on_dates_tab: + % if missed_deadlines: + ${_(' It looks like you missed some important deadlines based on our suggested schedule. To complete graded assignments as part of this course and shift the past due assignments into the future, you can upgrade today.')} + % else: + ${_(' To complete graded assignments as part of this course, you can upgrade today.')} + % endif + % else: + ${_(' It looks like you missed some important deadlines based on our suggested schedule. To complete graded assignments as part of this course and shift the past due assignments into the future, you can upgrade today.')} + % endif + % endif + % endif +
+ % if not is_mobile_app: +
+ % if on_course_outline_page_as_verified or (missed_deadlines and (on_dates_tab_as_verified or on_courseware_page_as_verified)): +
+ + + + +
+ % endif: + % if (on_dates_tab_as_audit and has_locked_assignments) or on_course_outline_page_as_audit or (on_courseware_page_as_audit and missed_deadlines): + + + + % endif +
+ % endif +
% endif +