Files
edx-platform/lms/templates/dates_banner.html

106 lines
5.0 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
## 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):
<div class="dates-banner">
<div class="dates-banner-text">
<strong>${_("We've built a suggested schedule to help you stay on track.")}</strong>
${_("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.")}
</div>
</div>
% endif
<%
additional_styling_class = 'on-mobile' if is_mobile_app else 'has-button'
%>
<%def name="reset_dates_banner()">
<div class="dates-banner ${additional_styling_class}">
<div class="dates-banner-text">
% if is_mobile_app:
${_('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>.
${_(' Dont worry—you wont lose any of the progress youve made when you shift your due dates.')}
% else:
<strong>${_('It looks like you missed some important deadlines based on our suggested schedule.')}</strong>
${_('To keep yourself on track, you can update this schedule and shift the past due assignments into the future. Dont worry—you wont lose any of the progress youve made when you shift your due dates.')}
% endif
</div>
% if not is_mobile_app:
<div class="upgrade-button">
<form method="post" action="${reset_deadlines_url}">
<input type="hidden" id="csrf_token" name="csrfmiddlewaretoken" value="${csrf_token}">
<input type="hidden" name="reset_deadlines_redirect_url_base" value="${reset_deadlines_redirect_url_base}">
<input type="hidden" name="reset_deadlines_redirect_url_id_dict" value="${reset_deadlines_redirect_url_id_dict}">
<button class="btn reset-deadlines-button">${_("Reset my deadlines")}</button>
</form>
</div>
% endif
</div>
</%def>
<%def name="upgrade_to_reset_banner()">
<div class="dates-banner ${additional_styling_class}">
<div class="dates-banner-text">
% if is_mobile_app:
<strong>${_('You are auditing this course,')}</strong>
${_(' which means that you are unable to participate in graded assignments.')}
${_(' It looks like you missed some important deadlines based on our suggested schedule. Graded assignments and schedule adjustment are available to Verified Track learners.')}
% else:
<strong>${_('You are auditing this course,')}</strong>
${_(' 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.')}
% endif
</div>
% if not is_mobile_app:
<div class="upgrade-button">
<a href="${verified_upgrade_link}">
<button type="button">
${_('Upgrade to shift due dates')}
</button>
</a>
</div>
% endif
</div>
</%def>
<%def name="upgrade_to_complete_graded_banner()">
<div class="dates-banner ${additional_styling_class}">
<div class="dates-banner-text">
% if is_mobile_app:
<strong>${_('You are auditing this course,')}</strong>
${_(' which means that you are unable to participate in graded assignments.')}
${_('Graded assignments are available to Verified Track learners.')}
% else:
<strong>${_('You are auditing this course,')}</strong>
${_(' which means that you are unable to participate in graded assignments.')}
${_(' To complete graded assignments as part of this course, you can upgrade today.')}
% endif
</div>
% if not is_mobile_app:
<div class="upgrade-button">
<a href="${verified_upgrade_link}">
<button type="button">
${_('Upgrade now')}
</button>
</a>
</div>
% endif
</div>
</%def>
% if on_dates_tab and content_type_gating_enabled and not missed_deadlines:
${upgrade_to_complete_graded_banner()}
% elif missed_deadlines:
% if missed_gated_content:
${upgrade_to_reset_banner()}
% else:
${reset_dates_banner()}
% endif
% endif