Check for the mobile app specifically in the dates banner conditionals
This commit is contained in:
@@ -107,6 +107,7 @@ from openedx.core.djangoapps.site_configuration import helpers as configuration_
|
||||
from openedx.core.djangoapps.util.user_messages import PageLevelMessages
|
||||
from openedx.core.djangoapps.zendesk_proxy.utils import create_zendesk_ticket
|
||||
from openedx.core.djangolib.markup import HTML, Text
|
||||
from openedx.core.lib.mobile_utils import is_request_from_mobile_app
|
||||
from openedx.features.course_duration_limits.access import generate_course_expired_fragment
|
||||
from openedx.features.course_experience import (
|
||||
COURSE_ENABLE_UNENROLLED_ACCESS_FLAG,
|
||||
@@ -1681,6 +1682,7 @@ def render_xblock(request, usage_key_string, check_if_enrolled=True):
|
||||
'on_courseware_page': True,
|
||||
'verified_upgrade_link': verified_upgrade_deadline_link(request.user, course=course),
|
||||
'is_learning_mfe': request.META.get('HTTP_REFERER', '').startswith(settings.LEARNING_MICROFRONTEND_URL),
|
||||
'is_mobile_app': is_request_from_mobile_app(request),
|
||||
}
|
||||
return render_to_response('courseware/courseware-chromeless.html', context)
|
||||
|
||||
|
||||
@@ -24,12 +24,12 @@ on_course_outline_page_as_audit = on_course_outline_page and enrollment_mode ==
|
||||
on_course_outline_page_as_verified = on_course_outline_page and enrollment_mode == CourseMode.VERIFIED
|
||||
on_courseware_page_as_audit = on_courseware_page and enrollment_mode == CourseMode.AUDIT
|
||||
on_courseware_page_as_verified = on_courseware_page and enrollment_mode == CourseMode.VERIFIED
|
||||
additional_styling_class = 'on-mobile' if web_app_course_url else 'has-button'
|
||||
additional_styling_class = 'on-mobile' if is_mobile_app else 'has-button'
|
||||
%>
|
||||
% if (missed_deadlines and (on_dates_tab_as_verified or on_courseware_page_as_audit or on_courseware_page_as_verified)) or (on_dates_tab_as_audit and has_locked_assignments) or on_course_outline_page_as_audit or on_course_outline_page_as_verified:
|
||||
<div class="dates-banner ${additional_styling_class}">
|
||||
<div class="dates-banner-text">
|
||||
% if web_app_course_url:
|
||||
% if is_mobile_app:
|
||||
% if enrollment_mode == CourseMode.VERIFIED:
|
||||
${_('It looks like you missed some important deadlines based on our suggested schedule. ')}
|
||||
${_('To keep yourself on track, you can update this schedule and shift the past due assignments into the future by visiting ')}
|
||||
@@ -61,7 +61,7 @@ additional_styling_class = 'on-mobile' if web_app_course_url else 'has-button'
|
||||
% endif
|
||||
% endif
|
||||
</div>
|
||||
% if not web_app_course_url:
|
||||
% if not is_mobile_app:
|
||||
<div class="upgrade-button">
|
||||
% if on_course_outline_page_as_verified or (missed_deadlines and (on_dates_tab_as_verified or on_courseware_page_as_verified)):
|
||||
<form method="post" action="${reset_deadlines_url}">
|
||||
|
||||
Reference in New Issue
Block a user