The dates tab has a lot of redundant calls to action around upgrading to verified track. This replaces them with a single banner at the top of the page. AA-102
92 lines
5.0 KiB
HTML
92 lines
5.0 KiB
HTML
<%page expression_filter="h"/>
|
|
<%inherit file="/main.html" />
|
|
<%namespace name='static' file='/static_content.html'/>
|
|
<%!
|
|
|
|
from django.utils.translation import ugettext as _
|
|
from lms.djangoapps.courseware.date_summary import CourseAssignmentDate, VerificationDeadlineDate, VerifiedUpgradeDeadlineDate
|
|
from openedx.core.djangolib.markup import HTML, Text
|
|
%>
|
|
|
|
<%block name="bodyclass">view-in-course view-progress</%block>
|
|
|
|
<%block name="headextra">
|
|
<%static:css group='style-course-vendor'/>
|
|
<%static:css group='style-course'/>
|
|
</%block>
|
|
|
|
<%block name="pagetitle">${_("{course.display_number_with_default} Course Info").format(course=course)}</%block>
|
|
|
|
<%include file="/courseware/course_navigation.html" args="active_page='dates'" />
|
|
|
|
<main id="main" aria-label="Content" tabindex="-1">
|
|
<div class="container">
|
|
<div class="date-wrapper">
|
|
<section class="course-info" id="course-info-dates">
|
|
<h2 class="hd hd-2 date-title">
|
|
${_("Important Dates")}
|
|
</h2>
|
|
<% has_locked_assignments = any(hasattr(block, 'requires_full_access') and block.requires_full_access for block in course_date_blocks if isinstance(block, CourseAssignmentDate)) %>
|
|
% if has_locked_assignments and verified_upgrade_link:
|
|
<div class="upgrade-banner">
|
|
<div class="upgrade-banner-text">
|
|
<strong>${_('You are auditing this course.')}</strong>
|
|
${_('This means that you are unable to participate in graded assignments.')}
|
|
${_('To complete graded assignments as part of this course, you can upgrade today.')}
|
|
</div>
|
|
<div class="upgrade-button">
|
|
<a href="${verified_upgrade_link}">
|
|
<button type="button">
|
|
${_('Upgrade now')}
|
|
</button>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
% endif
|
|
|
|
% for block in course_date_blocks:
|
|
<% active = 'active' if block.date and (block.date.strftime(block.date_format) == block.current_time.strftime(block.date_format)) else '' %>
|
|
<% block_is_verified = (hasattr(block, 'requires_full_access') and block.requires_full_access) or isinstance(block, VerificationDeadlineDate) %>
|
|
<% learner_has_access = not block_is_verified or learner_is_verified %>
|
|
<% access_class = '' if learner_has_access else 'no-access' %>
|
|
<% is_assignment = isinstance(block, CourseAssignmentDate) %>
|
|
% if not (learner_is_verified and isinstance(block, VerifiedUpgradeDeadlineDate)):
|
|
<div class="timeline-item ${active}">
|
|
<div class="date-circle ${active}"></div>
|
|
<div class="date-content ${active}">
|
|
<div class="timeline-date-content">
|
|
% if block.date:
|
|
<div class="timeline-date">
|
|
<div class="course-date localized_datetime" aria-hidden="true" data-format="shortDate" data-datetime="${block.date}" data-language="${user_language}" data-timezone="${user_timezone}"></div>
|
|
</div>
|
|
% if active:
|
|
<div class="pill due">${_('Due Today')}</div>
|
|
% endif
|
|
% if not learner_has_access:
|
|
<div class="pill verified"><span class="fa fa-lock verified-icon" aria-hidden="true"></span>${_('Verified Only')}</div>
|
|
% endif
|
|
% endif
|
|
</div>
|
|
<div class="timeline-title ${access_class}">
|
|
% if block.title_html and is_assignment and learner_has_access:
|
|
${block.title_html}
|
|
% else:
|
|
${block.title}
|
|
% endif
|
|
</div>
|
|
<div class="timeline-description ${access_class}">
|
|
${block.description}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
% endif
|
|
% endfor
|
|
</section>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
|
|
<%static:require_module_async module_name="js/dateutil_factory" class_name="DateUtilFactory">
|
|
DateUtilFactory.transform(iterationKey=".localized_datetime");
|
|
</%static:require_module_async>
|