Newer
Older
## 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
%>
<%
Calen Pennington
committed
additional_styling_class = 'on-mobile' if is_mobile_app else 'has-button'
Calen Pennington
committed
<%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>.
${_(' Don’t worry—you won’t lose any of the progress you’ve 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. Don’t worry—you won’t lose any of the progress you’ve 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">
Calen Pennington
committed
% 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.')}
Calen Pennington
committed
<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>
Calen Pennington
committed
% if not is_mobile_app:
<div class="upgrade-button">
Calen Pennington
committed
<a href="${verified_upgrade_link}">
<button type="button">
${_('Upgrade to shift due dates')}
</button>
</a>
</div>
% endif
</div>
Calen Pennington
committed
</%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 not is_archived:
% if on_dates_tab and not missed_deadlines:
%if 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
% if content_type_gating_enabled:
${upgrade_to_complete_graded_banner()}
% endif
% elif missed_deadlines:
% if missed_gated_content:
${upgrade_to_reset_banner()}
% else:
${reset_dates_banner()}
% endif
Calen Pennington
committed
% endif