- ${_("We've built a suggested schedule to help you stay on track.")}
- ${_("But don't worry—it's flexible so you can learn at your own pace.")}
- ${_("If you happen to fall behind on our suggested dates, you'll be able to adjust them to keep yourself on track.")}
-
-
- % endif
- <% has_locked_assignments = any(hasattr(block, 'contains_gated_content') and block.contains_gated_content for block in course_date_blocks) %>
- % if has_locked_assignments and verified_upgrade_link:
-
-
- ${_('You are auditing this course,')}
- ${_(' which means that you are unable to participate in graded assignments.')}
- % if display_reset_dates_text:
- ${_(' 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
-
- % endif
- % if display_reset_dates_text and learner_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. Don’t worry—you won’t lose any of the progress you’ve made when you shift your due dates. ')}
-
-
-
-
-
- % endif
-
+ <%include file="/dates_banner.html" />
<% due_next_set = False %>
% for block in course_date_blocks:
<% block_is_verified = (hasattr(block, 'contains_gated_content') and block.contains_gated_content) or isinstance(block, VerificationDeadlineDate) %>
diff --git a/lms/templates/dates_banner.html b/lms/templates/dates_banner.html
new file mode 100644
index 0000000000..f26e7c2451
--- /dev/null
+++ b/lms/templates/dates_banner.html
@@ -0,0 +1,92 @@
+## mako
+
+<%page expression_filter="h"/>
+<%!
+from django.utils.translation import ugettext as _
+
+from lms.djangoapps.courseware.date_summary import CourseAssignmentDate
+from course_modes.models import CourseMode
+%>
+
+% if on_dates_tab and not missed_deadlines and getattr(course, 'self_paced', False):
+
+
+ ${_("We've built a suggested schedule to help you stay on track.")}
+ ${_("But don't worry—it's flexible so you can learn at your own pace. If you happen to fall behind on our suggested dates, you'll be able to adjust them to keep yourself on track.")}
+
+
+% 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
+additional_styling_class = 'on-mobile' if web_app_course_url 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 web_app_course_url:
+ % 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 web_app_course_url:
+
+ % 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
diff --git a/lms/templates/main.html b/lms/templates/main.html
index efeeca1718..48edc767a1 100644
--- a/lms/templates/main.html
+++ b/lms/templates/main.html
@@ -185,11 +185,6 @@ from pipeline_mako import render_require_js_path_overrides
<%include file="/preview_menu.html" />
% endif
- <% is_course_staff = bool(user and course and has_access(user, 'staff', course, course.id)) %>
- % if course and course.self_paced and display_reset_dates_banner and not is_course_staff:
- <%include file="/reset_deadlines_banner.html" />
- % endif
-
<%include file="/page_banner.html" />
- % if web_app_course_url:
- ${_("It looks like you've missed some important deadlines. Visit ")}
- ${_("edx.org")}
- ${_(" to reset your deadlines and get started today.")}
- % else:
- ${_("It looks like you've missed some important deadlines. Reset your deadlines and get started today.")}
- % endif
-
- % if not web_app_course_url:
-
- % endif
-
diff --git a/openedx/features/course_experience/templates/course_experience/course-outline-fragment.html b/openedx/features/course_experience/templates/course_experience/course-outline-fragment.html
index 53169150c3..5435b2370c 100644
--- a/openedx/features/course_experience/templates/course_experience/course-outline-fragment.html
+++ b/openedx/features/course_experience/templates/course_experience/course-outline-fragment.html
@@ -13,15 +13,24 @@ from django.utils import timezone
from django.utils.translation import gettext as _
from django.utils.translation import ngettext
+from lms.djangoapps.courseware.access import has_access
from openedx.core.djangolib.markup import HTML, Text
+from openedx.features.course_experience import RELATIVE_DATES_FLAG
%>
<%
course_sections = blocks.get('children')
self_paced = context.get('self_paced', False)
-reset_deadlines_banner_displayed = False
+relative_dates_flag_is_enabled = RELATIVE_DATES_FLAG.is_enabled(str(course_key))
+is_course_staff = bool(user and course and has_access(user, 'staff', course, course.id))
+dates_banner_displayed = False
%>
+
+ % if enrollment_mode and relative_dates_flag_is_enabled and self_paced and not is_course_staff:
+ <%include file="/dates_banner.html" />
+ % endif
+