% if entitlement and not entitlement_expired_at:
<%static:webpack entry="EntitlementFactory">
EntitlementFactory({
el: '${ '#course-card-' + str(course_card_index) + ' .course-entitlement-selection-container' | n, js_escaped_string }',
triggerOpenBtn: '${ '#course-card-' + str(course_card_index) + ' .change-session' | n, js_escaped_string }',
courseCardMessages: '${ '#course-card-' + str(course_card_index) + ' .messages-list > .message' | n, js_escaped_string }',
courseTitleLink: '${ '#course-card-' + str(course_card_index) + ' .course-title a' | n, js_escaped_string }',
courseImageLink: '${ '#course-card-' + str(course_card_index) + ' .wrapper-course-image > a' | n, js_escaped_string }',
dateDisplayField: '${ '#course-card-' + str(course_card_index) + ' .info-date-block' | n, js_escaped_string }',
policyMsg: '${ '#course-card-' + str(course_card_index) + ' .info-expires-at' | n, js_escaped_string }',
enterCourseBtn: '${ '#course-card-' + str(course_card_index) + ' .enter-course' | n, js_escaped_string }',
availableSessions: '${ entitlement_available_sessions | n, dump_js_escaped_json }',
entitlementUUID: '${ entitlement.course_uuid | n, js_escaped_string }',
currentSessionId: '${ entitlement_session.course_id if entitlement_session else "" | n, js_escaped_string }',
enrollUrl: '${ reverse('entitlements_api:v1:enrollments', args=[str(entitlement.uuid)]) | n, js_escaped_string }',
courseHomeUrl: '${ course_target | n, js_escaped_string }',
expiredAt: '${ entitlement.expired_at_datetime | n, js_escaped_string }',
daysUntilExpiration: '${ entitlement.get_days_until_expiration() | n, js_escaped_string }'
});
%static:webpack>
%endif
% if related_programs:
% endif
% if cert_status:
<%include file='_dashboard_certificate_information.html' args='cert_status=cert_status,course_overview=course_overview, enrollment=enrollment, reverify_link=reverify_link'/>
% endif
% if credit_status is not None:
<%include file="_dashboard_credit_info.html" args="credit_status=credit_status"/>
% endif
% if show_consent_link:
<%include file="_dashboard_show_consent.html" args="course_overview=course_overview, course_target=course_target, enrollment=enrollment, enterprise_customer_name=enterprise_customer_name"/>
%endif
% if verification_status.get('should_display') and verification_status.get('status') in [VERIFY_STATUS_NEED_TO_VERIFY, VERIFY_STATUS_SUBMITTED, VERIFY_STATUS_RESUBMITTED, VERIFY_STATUS_APPROVED, VERIFY_STATUS_NEED_TO_REVERIFY]:
% if verification_status['status'] == VERIFY_STATUS_NEED_TO_VERIFY:
% if verification_status['days_until_deadline'] is not None:
${_('Verification not yet complete.')}
${ungettext(
'You only have {days} day left to verify for this course.',
'You only have {days} days left to verify for this course.',
verification_status['days_until_deadline']
).format(days=verification_status['days_until_deadline'])}
% else:
${_('Almost there!')}
${_('You still need to verify for this course.')}
% endif
% elif verification_status['status'] == VERIFY_STATUS_SUBMITTED:
${_('You have submitted your verification information.')}
${_('You will see a message on your dashboard when the verification process is complete (usually within 5-7 days).')}
% elif verification_status['status'] == VERIFY_STATUS_RESUBMITTED:
${_('Your current verification will expire soon!')}
${_('You have submitted your reverification information. You will see a message on your dashboard when the verification process is complete (usually within 5-7 days).')}
% elif verification_status['status'] == VERIFY_STATUS_APPROVED:
${_('You have successfully verified your ID with edX')}
% if verification_status.get('verification_good_until') is not None:
${_('Your current verification is effective until {date}.').format(date=verification_status['verification_good_until'])}
% endif
% elif verification_status['status'] == VERIFY_STATUS_NEED_TO_REVERIFY:
${_('Your current verification will expire soon.')}
## Translators: start_link and end_link will be replaced with HTML tags;
## please do not translate these.
${Text(_('Your current verification will expire in {days} days. {start_link}Re-verify your identity now{end_link} using a webcam and a government-issued photo ID.')).format(
start_link=HTML('').format(href=reverse('verify_student_reverify')),
end_link=HTML(''),
days=settings.VERIFY_STUDENT.get("EXPIRING_SOON_WINDOW")
)}
% endif
% endif
% if course_mode_info and course_mode_info['show_upsell'] and not entitlement:
${_("Pursue a {cert_name_long} to highlight the knowledge and skills you gain in this course.").format(cert_name_long=cert_name_long)}
${Text(_("It's official. It's easily shareable. "
"It's a proven motivator to complete the course. {line_break}"
"{link_start}Learn more about the verified {cert_name_long}{link_end}.")).format(
line_break=HTML('
'),
link_start=HTML('').format(
marketing_link('WHAT_IS_VERIFIED_CERT'),
enrollment.course_id
),
link_end=HTML(''),
cert_name_long=cert_name_long
)}
% endif
% if course_requirements:
## Multiple pre-requisite courses are not supported on frontend that's why we are pulling first element
<% prc_target = reverse('about_course', args=[six.text_type(course_requirements['courses'][0]['key'])]) %>
${Text(_("You must successfully complete {link_start}{prc_display}{link_end} before you begin this course.")).format(
link_start=HTML('').format(prc_target),
link_end=HTML(''),
prc_display=course_requirements['courses'][0]['display'],
)}
% endif