feat!: drop legacy course home view and related code
This was the "outline tab" view of the course. Preceded by the
course info view, succeeded by the MFE outline tab.
In addition to the course home view itself, this drops related
features:
- Legacy version of Course Goals (MFE has a newer implementation)
- Course home in-course search (MFE has no search)
The old course info view and course about views survive for now.
This also drops a few now-unused feature toggles:
- course_experience.latest_update
- course_experience.show_upgrade_msg_on_course_home
- course_experience.upgrade_deadline_message
- course_home.course_home_use_legacy_frontend
With this change, just the progress and courseware tabs are still
supported in legacy form, if you opt-in with waffle flags. The
outline and dates tabs are offered only by the MFE.
AA-798
(This is identical to previous commit be5c1a6, just reintroduced
now that the e2e tests have been fixed)
This commit is contained in:
@@ -25,11 +25,6 @@ from openedx.features.course_experience import course_home_page_title, DISABLE_C
|
||||
completion_aggregator_url = settings.COMPLETION_AGGREGATOR_URL if settings.FEATURES.get("SHOW_PROGRESS_BAR", False) else ""
|
||||
%>
|
||||
|
||||
% if display_reset_dates_banner:
|
||||
<script type="text/javascript">
|
||||
$('.reset-deadlines-banner').css('display', 'flex');
|
||||
</script>
|
||||
% endif
|
||||
<%def name="course_name()">
|
||||
<% return _("{course_number} Courseware").format(course_number=course.display_number_with_default) %>
|
||||
</%def>
|
||||
|
||||
@@ -12,12 +12,10 @@ from django.urls import reverse
|
||||
from common.djangoapps.course_modes.models import CourseMode
|
||||
from common.djangoapps.course_modes.helpers import enrollment_mode_display
|
||||
from common.djangoapps.student.helpers import user_has_passing_grade_in_course
|
||||
from lms.djangoapps.course_home_api.toggles import course_home_legacy_is_active
|
||||
from lms.djangoapps.verify_student.services import IDVerificationService
|
||||
from openedx.core.djangolib.js_utils import dump_js_escaped_json, js_escaped_string
|
||||
from openedx.core.djangolib.markup import HTML, Text
|
||||
from openedx.features.course_experience import course_home_url_name
|
||||
from openedx.features.course_experience.url_helpers import get_learning_mfe_home_url
|
||||
from openedx.features.course_experience import course_home_url
|
||||
from common.djangoapps.student.helpers import (
|
||||
VERIFY_STATUS_NEED_TO_VERIFY,
|
||||
VERIFY_STATUS_SUBMITTED,
|
||||
@@ -82,7 +80,7 @@ from lms.djangoapps.experiments.utils import UPSELL_TRACKING_FLAG
|
||||
% endif
|
||||
>
|
||||
<article class="course${mode_class}" aria-labelledby="course-title-${enrollment.course_id}" id="course-card-${course_card_index}">
|
||||
<% course_target = reverse(course_home_url_name(course_overview.id), args=[str(course_overview.id)]) if course_home_legacy_is_active(course_overview.id) else get_learning_mfe_home_url(course_key=course_overview.id, url_fragment="home") %>
|
||||
<% course_target = course_home_url(course_overview.id) %>
|
||||
<section class="details" aria-labelledby="details-heading-${enrollment.course_id}">
|
||||
<h2 class="hd hd-2 sr" id="details-heading-${enrollment.course_id}">${_('Course details')}</h2>
|
||||
<div class="wrapper-course-image" aria-hidden="true">
|
||||
|
||||
@@ -1,108 +0,0 @@
|
||||
## mako
|
||||
|
||||
<%page expression_filter="h"/>
|
||||
<%!
|
||||
from django.utils.translation import ugettext as _
|
||||
|
||||
from lms.djangoapps.courseware.date_summary import CourseAssignmentDate
|
||||
from common.djangoapps.course_modes.models import CourseMode
|
||||
%>
|
||||
|
||||
<%
|
||||
additional_styling_class = 'on-mobile' if is_mobile_app else 'has-button'
|
||||
%>
|
||||
|
||||
<%def name="reset_dates_banner()">
|
||||
<div class="banner-cta ${additional_styling_class}">
|
||||
<div class="banner-cta-text">
|
||||
% if is_mobile_app:
|
||||
${_('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 ')}
|
||||
<a class="mobile-dates-link" href="${web_app_course_url}">edx.org</a>.
|
||||
${_(" Don't worry—you won't lose any of the progress you've made when you shift your due dates.")}
|
||||
% else:
|
||||
<strong>${_('It looks like you missed some important deadlines based on our suggested schedule.')}</strong>
|
||||
${_("To keep yourself on track, you can update this schedule and shift the past due assignments into the future. Don't worry—you won't lose any of the progress you've made when you shift your due dates.")}
|
||||
% endif
|
||||
</div>
|
||||
% if not is_mobile_app:
|
||||
<div class="banner-cta-button">
|
||||
<form method="post" action="${reset_deadlines_url}">
|
||||
<input type="hidden" id="csrf_token" name="csrfmiddlewaretoken" value="${csrf_token}">
|
||||
<input type="hidden" name="course_id" value="${course.id}">
|
||||
<button class="btn btn-outline-primary">${_("Shift due dates")}</button>
|
||||
</form>
|
||||
</div>
|
||||
% endif
|
||||
</div>
|
||||
</%def>
|
||||
<%def name="upgrade_to_reset_banner()">
|
||||
<div class="banner-cta ${additional_styling_class}">
|
||||
<div class="banner-cta-text">
|
||||
% if is_mobile_app:
|
||||
<strong>${_('You are auditing this course,')}</strong>
|
||||
${_(' which means that you are unable to participate in graded assignments.')}
|
||||
${_(' It looks like you missed some important deadlines based on our suggested schedule. Graded assignments and schedule adjustment are available to Verified Track learners.')}
|
||||
% else:
|
||||
<strong>${_('You are auditing this course,')}</strong>
|
||||
${_(' which means that you are unable to participate in graded assignments.')}
|
||||
${_(' It looks like you missed some important deadlines based on our suggested schedule. To complete graded assignments as part of this course and shift the past due assignments into the future, you can upgrade today.')}
|
||||
% endif
|
||||
</div>
|
||||
% if not is_mobile_app:
|
||||
<div class="banner-cta-button">
|
||||
<a class="personalized_learner_schedules_button" href="${verified_upgrade_link}">
|
||||
<button type="button">
|
||||
${_('Upgrade to shift due dates')}
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
% endif
|
||||
</div>
|
||||
</%def>
|
||||
<%def name="upgrade_to_complete_graded_banner()">
|
||||
<div class="banner-cta ${additional_styling_class}">
|
||||
<div class="banner-cta-text">
|
||||
% if is_mobile_app:
|
||||
<strong>${_('You are auditing this course,')}</strong>
|
||||
${_(' which means that you are unable to participate in graded assignments.')}
|
||||
${_('Graded assignments are available to Verified Track learners.')}
|
||||
% else:
|
||||
<strong>${_('You are auditing this course,')}</strong>
|
||||
${_(' which means that you are unable to participate in graded assignments.')}
|
||||
${_(' To complete graded assignments as part of this course, you can upgrade today.')}
|
||||
% endif
|
||||
</div>
|
||||
% if not is_mobile_app:
|
||||
<div class="banner-cta-button">
|
||||
<a class="personalized_learner_schedules_button" href="${verified_upgrade_link}">
|
||||
<button type="button">
|
||||
${_('Upgrade now')}
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
% endif
|
||||
</div>
|
||||
</%def>
|
||||
|
||||
% if not has_ended:
|
||||
% if on_dates_tab and not missed_deadlines:
|
||||
%if getattr(course, 'self_paced', False):
|
||||
<div class="banner-cta">
|
||||
<div class="banner-cta-text">
|
||||
<strong>${_("We've built a suggested schedule to help you stay on track.")}</strong>
|
||||
${_("But don't worry—it's flexible so you can learn at your own pace. If you happen to fall behind on our suggested dates, you'll be able to adjust them to keep yourself on track.")}
|
||||
</div>
|
||||
</div>
|
||||
% endif
|
||||
% if content_type_gating_enabled:
|
||||
${upgrade_to_complete_graded_banner()}
|
||||
% endif
|
||||
% elif missed_deadlines:
|
||||
% if missed_gated_content:
|
||||
${upgrade_to_reset_banner()}
|
||||
% else:
|
||||
${reset_dates_banner()}
|
||||
% endif
|
||||
% endif
|
||||
% endif
|
||||
Reference in New Issue
Block a user