Merge pull request #28462 from edx/mikix/banner-style

fix: modernize look of in-xblock shift-dates banner
This commit is contained in:
Michael Terry
2021-08-16 09:51:53 -04:00
committed by GitHub
4 changed files with 16 additions and 9 deletions

View File

@@ -11,6 +11,7 @@ from django.urls import reverse
from django.utils.translation import ngettext, gettext as _
from xmodule.util.misc import is_xblock_an_assignment
from openedx.core.djangolib.markup import HTML, Text
from openedx.core.lib.mobile_utils import is_request_from_mobile_app
from openedx.features.course_experience.url_helpers import is_request_from_learning_mfe
from openedx.features.course_experience.utils import dates_banner_should_display
@@ -119,9 +120,14 @@ class PersonalizedLearnerScheduleCallToAction:
'form_values': {
'course_id': course_key,
},
'description': _('To participate in this assignment, the suggested schedule for your course needs '
'updating. Dont worry, well shift all the due dates for you and you wont lose '
'any of your progress.'),
'description': Text('{b_open}{header}{b_close} {explanation}').format(
b_open=HTML('<b>'),
b_close=HTML('</b>'),
header=_('It looks like you missed some important deadlines based on our suggested schedule.'),
explanation=_('To keep yourself on track, you can update this schedule and shift the past due '
'assignments into the future. Dont worry—you wont lose any of the progress youve '
'made when you shift your due dates.'),
),
}
has_attempts = hasattr(xblock, 'attempts') and hasattr(xblock, 'max_attempts')