${_("Course Outline")}
-${_("Loading")}
-diff --git a/cms/djangoapps/contentstore/rest_api/v1/serializers/course_waffle_flags.py b/cms/djangoapps/contentstore/rest_api/v1/serializers/course_waffle_flags.py index f3caa6daeb..07d73cb90d 100644 --- a/cms/djangoapps/contentstore/rest_api/v1/serializers/course_waffle_flags.py +++ b/cms/djangoapps/contentstore/rest_api/v1/serializers/course_waffle_flags.py @@ -116,9 +116,11 @@ class CourseWaffleFlagsSerializer(serializers.Serializer): def get_use_new_course_outline_page(self, obj): """ Method to get the use_new_course_outline_page switch + + Always true, because the switch is being removed an the new experience + should alawys be on. """ - course_key = self.get_course_key() - return toggles.use_new_course_outline_page(course_key) + return True def get_use_new_unit_page(self, obj): """ diff --git a/cms/djangoapps/contentstore/toggles.py b/cms/djangoapps/contentstore/toggles.py index de05a46ef3..2edafab7fa 100644 --- a/cms/djangoapps/contentstore/toggles.py +++ b/cms/djangoapps/contentstore/toggles.py @@ -364,13 +364,6 @@ def use_new_video_uploads_page(course_key): LEGACY_STUDIO_COURSE_OUTLINE = CourseWaffleFlag('legacy_studio.course_outline', __name__) -def use_new_course_outline_page(course_key): - """ - Returns a boolean if new studio course outline mfe is enabled - """ - return not LEGACY_STUDIO_COURSE_OUTLINE.is_enabled(course_key) - - # .. toggle_name: legacy_studio.unit_editor # .. toggle_implementation: WaffleFlag # .. toggle_default: False diff --git a/cms/djangoapps/contentstore/utils.py b/cms/djangoapps/contentstore/utils.py index 04ed278768..f0afe226f5 100644 --- a/cms/djangoapps/contentstore/utils.py +++ b/cms/djangoapps/contentstore/utils.py @@ -43,7 +43,6 @@ from cms.djangoapps.contentstore.toggles import ( split_library_view_on_dashboard, use_new_advanced_settings_page, use_new_certificates_page, - use_new_course_outline_page, use_new_course_team_page, use_new_custom_pages, use_new_export_page, @@ -443,13 +442,12 @@ def get_course_outline_url(course_locator, block_to_show=None) -> str: Gets course authoring microfrontend URL for course oultine page view. """ course_outline_url = None - if use_new_course_outline_page(course_locator): - mfe_base_url = get_course_authoring_url(course_locator) - course_mfe_url = f'{mfe_base_url}/course/{course_locator}' - if block_to_show: - course_mfe_url += f'?show={quote_plus(block_to_show)}' - if mfe_base_url: - course_outline_url = course_mfe_url + mfe_base_url = get_course_authoring_url(course_locator) + course_mfe_url = f'{mfe_base_url}/course/{course_locator}' + if block_to_show: + course_mfe_url += f'?show={quote_plus(block_to_show)}' + if mfe_base_url: + course_outline_url = course_mfe_url return course_outline_url diff --git a/cms/djangoapps/contentstore/views/course.py b/cms/djangoapps/contentstore/views/course.py index e37d980efb..453e30e0aa 100644 --- a/cms/djangoapps/contentstore/views/course.py +++ b/cms/djangoapps/contentstore/views/course.py @@ -90,7 +90,6 @@ from ..courseware_index import CoursewareSearchIndexer, SearchIndexingError from ..tasks import rerun_course as rerun_course_task from ..toggles import ( default_enable_flexible_peer_openassessments, - use_new_course_outline_page, use_new_updates_page, use_new_advanced_settings_page, use_new_grading_page, @@ -102,7 +101,6 @@ from ..utils import ( add_instructor, get_advanced_settings_url, get_course_grading, - get_course_index_context, get_course_outline_url, get_course_rerun_context, get_course_settings, @@ -740,18 +738,8 @@ def course_index(request, course_key): org, course, name: Attributes of the Location for the item to edit """ - if use_new_course_outline_page(course_key): - block_to_show = request.GET.get("show") - return redirect(get_course_outline_url(course_key, block_to_show)) - with modulestore().bulk_operations(course_key): - # A depth of None implies the whole course. The course outline needs this in order to compute has_changes. - # A unit may not have a draft version, but one of its components could, and hence the unit itself has changes. - course_block = get_course_and_check_access(course_key, request.user, depth=None) - if not course_block: - raise Http404 - # should be under bulk_operations if course_block is passed - course_index_context = get_course_index_context(request, course_key, course_block) - return render_to_response('course_outline.html', course_index_context) + block_to_show = request.GET.get("show") + return redirect(get_course_outline_url(course_key, block_to_show)) @function_trace('get_courses_accessible_to_user') diff --git a/cms/templates/course_outline.html b/cms/templates/course_outline.html deleted file mode 100644 index 61f524123b..0000000000 --- a/cms/templates/course_outline.html +++ /dev/null @@ -1,332 +0,0 @@ -<%page expression_filter="h"/> -<%inherit file="base.html" /> -<%def name="online_help_token()"><% return "develop_course" %>%def> -<%! -import logging -from six.moves.urllib.parse import quote - -from cms.djangoapps.contentstore.config.waffle_utils import should_show_checklists_quality -from common.djangoapps.util.date_utils import get_default_time_display -from django.utils.translation import gettext as _ -from openedx.core.djangolib.js_utils import js_escaped_string, dump_js_escaped_json -from openedx.core.djangolib.markup import HTML, Text -from django.urls import reverse -%> -<%block name="title">${_("Course Outline")}%block> -<%block name="bodyclass">is-signedin course view-outline%block> - -<%namespace name='static' file='static_content.html'/> - -<%block name="requirejs"> - require(["js/factories/outline"], function (OutlineFactory) { - OutlineFactory( - ${course_structure | n, dump_js_escaped_json}, - ${initial_state | n, dump_js_escaped_json}, - ${initial_user_clipboard | n, dump_js_escaped_json} - ); - }); -%block> - -<%block name="header_extras"> - -% for template_name in ['course-outline', 'xblock-string-field-editor', 'basic-modal', 'modal-button', 'course-outline-modal', 'due-date-editor', 'self-paced-due-date-editor', 'release-date-editor', 'grading-editor', 'publish-editor', 'staff-lock-editor', 'unit-access-editor', 'discussion-editor', 'content-visibility-editor', 'verification-access-editor', 'timed-examination-preference-editor', 'access-editor', 'settings-modal-tabs', 'show-correctness-editor', 'highlights-editor', 'highlights-enable-editor', 'course-highlights-enable', 'course-manage-tags', 'course-video-sharing-enable', 'summary-configuration-editor', 'tag-count', 'subsection-share-link-modal-tabs', 'full-page-share-link-editor', 'embed-link-share-link-editor']: - -% endfor -<%static:optional_include_mako file="course_outline_header_extras_post.html" /> - -% if not settings.STUDIO_FRONTEND_CONTAINER_URL: - - -% endif -%block> - -<%block name="page_alert"> - %if notification_dismiss_url is not None: -
${_("No course content is currently visible, and no learners are enrolled. Be sure to review and reset all dates, including the Course Start Date; set up the course team; review course updates and other assets for dated material; and seed the discussions and wiki.")}
-${_("You must delete or replace the following components.")}
- -- ${Text(_("To avoid errors, {platform_name} strongly recommends that you remove unsupported features from the course advanced settings. To do this, go to the {link_start}Advanced Settings page{link_end}, locate the \"Advanced Module List\" setting, and then delete the following modules from the list.")).format( - platform_name=static.get_platform_name(), - link_start=HTML('').format(advance_settings_url=deprecated_blocks_info['advance_settings_url']), - link_end=HTML("") - )} -
- -- % if mfe_proctored_exam_settings_url: - <% url_encoded_course_id = quote(str(context_course.id).encode('utf-8'), safe='') %> - ${Text(_("To update these settings go to the {link_start}Proctored Exam Settings page{link_end}.")).format( - link_start=HTML('').format( - mfe_proctored_exam_settings_url=mfe_proctored_exam_settings_url - ), - link_end=HTML("") - )} - % else: - ${Text(_("To update these settings go to the {link_start}Advanced Settings page{link_end}.")).format( - link_start=HTML('').format(advance_settings_url=advance_settings_url), - link_end=HTML("") - )} - % endif -
-${_("Loading")}
-