<%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:
${_("Warning")}

${_("This course uses a legacy storage format.")}

${expiration_message} ${_( "Please reach out to your support team contact, " "if you have any additional questions or concerns." )}

% endif