in preparation of dropping support for them entirely. Re: timing: We will _not_ be going live with this on edx.org at launch; we'll override this setting on our own installs, initially. We do, however, want to get this merged ASAP, so that it can still be pulled into Juniper. That will allow us to drop support in time for the Koa Named Release, while still providing community operators with a full Named Release cycle to handle deprecation on their installations. References: - [0] TNL-7097
50 lines
1.7 KiB
HTML
50 lines
1.7 KiB
HTML
<%page args="course=None" expression_filter="h" />
|
|
<%!
|
|
from datetime import datetime
|
|
from datetime import date
|
|
|
|
from django.conf import settings
|
|
from django.utils.translation import ugettext as _
|
|
|
|
from openedx.core.djangolib.translation_utils import translate_date
|
|
|
|
DEFAULT_LANGUAGE = getattr(settings, 'LANGUAGE_CODE', 'en')
|
|
IS_ENABLED = settings.FEATURES.get('DEPRECATE_OLD_COURSE_KEYS_IN_STUDIO', True)
|
|
%>
|
|
<%
|
|
is_visible = IS_ENABLED and course and course.id.deprecated
|
|
if is_visible:
|
|
try:
|
|
expiration_date = datetime.strptime(IS_ENABLED, "%Y-%m-%d")
|
|
except TypeError as error:
|
|
expiration_message = _('Support will be removed in an upcoming release.')
|
|
else:
|
|
language = getattr(course, 'language', None) or DEFAULT_LANGUAGE
|
|
expiration_date = date(expiration_date.year, expiration_date.month, expiration_date.day)
|
|
expiration_date = translate_date(expiration_date, language=language)
|
|
expiration_message = _("Support will be removed on {expiration_date}.").format(
|
|
expiration_date=expiration_date,
|
|
)
|
|
is_visible = True
|
|
%>
|
|
% if is_visible:
|
|
<div class="wrapper wrapper-alert wrapper-alert-warning is-shown">
|
|
<div class="alert announcement">
|
|
<span class="feedback-symbol fa fa-warning" aria-hidden="true"></span>
|
|
<span class="sr">${_("Warning")}</span>
|
|
<div class="copy">
|
|
<h2 class="title title-3 warning-heading-text">
|
|
${_("This course uses a legacy storage format.")}
|
|
</h2>
|
|
<p>
|
|
${expiration_message}
|
|
${_(
|
|
"Please reach out to your support team contact, "
|
|
"if you have any additional questions or concerns."
|
|
)}
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
% endif
|