diff --git a/cms/djangoapps/contentstore/views/component.py b/cms/djangoapps/contentstore/views/component.py index c30eb49b9529..df75ee26560d 100644 --- a/cms/djangoapps/contentstore/views/component.py +++ b/cms/djangoapps/contentstore/views/component.py @@ -22,7 +22,7 @@ from xblock.runtime import Mixologist from cms.djangoapps.contentstore.helpers import get_parent_if_split_test, is_library_content, is_unit -from cms.djangoapps.contentstore.toggles import libraries_v1_enabled, libraries_v2_enabled, use_new_unit_page +from cms.djangoapps.contentstore.toggles import libraries_v2_enabled, use_new_unit_page from cms.djangoapps.contentstore.xblock_storage_handlers.view_handlers import load_services_for_studio from common.djangoapps.edxmako.shortcuts import render_to_response from common.djangoapps.student.auth import has_course_author_access @@ -49,7 +49,6 @@ 'problem', 'itembank', 'library_v2', # Not an XBlock - 'library', 'discussion', 'openassessment', 'drag-and-drop-v2', @@ -274,7 +273,6 @@ def create_support_legend_dict(): 'problem': _("Problem"), 'video': _("Video"), 'openassessment': _("Open Response"), - 'library': _("Legacy Library"), 'library_v2': _("Library Content"), 'itembank': _("Problem Bank"), 'drag-and-drop-v2': _("Drag and Drop"), @@ -286,10 +284,9 @@ def create_support_legend_dict(): # by the components in the order listed in COMPONENT_TYPES. component_types = COMPONENT_TYPES[:] - # Libraries do not support discussions, drag-and-drop, and openassessment and other libraries + # Libraries do not support discussions, drag-and-drop, openassessment, and library_v2/itembank component_not_supported_by_library = [ 'discussion', - 'library', 'openassessment', 'drag-and-drop-v2', 'library_v2', @@ -313,7 +310,7 @@ def create_support_legend_dict(): templates_for_category = [] component_class = _load_mixed_class(category) - if support_level_without_template and category not in ['library']: + if support_level_without_template: # add the default template with localized display name # TODO: Once mixins are defined per-application, rather than per-runtime, # this should use a cms mixed-in class. (cpennington) @@ -397,37 +394,6 @@ def create_support_legend_dict(): ) categories.add(component) - # Add library block types. - if category == 'library' and not library: - disabled_block_names = [block.name for block in disabled_xblocks()] - library_block_types = [problem_type for problem_type in LIBRARY_BLOCK_TYPES - if problem_type['component'] not in disabled_block_names] - for library_block_type in library_block_types: - component = library_block_type['component'] - boilerplate_name = library_block_type['boilerplate_name'] - authorable_variations = authorable_xblocks(allow_unsupported=allow_unsupported, name=component) - library_component_support_level = component_support_level( - authorable_variations, component, boilerplate_name - ) - if library_component_support_level: - try: - component_display_name = xblock_type_display_name(component, default_display_name=component) - except PluginMissingError: - log.warning( - "Unable to load xblock type %s to read display_name", - component - ) - else: - templates_for_category.append( - create_template_dict( - component_display_name, - component, - library_component_support_level, - boilerplate_name - ) - ) - categories.add(component) - component_templates.append({ "type": category, "templates": templates_for_category, @@ -512,8 +478,6 @@ def _filter_disabled_blocks(all_blocks): Filter out disabled xblocks from the provided list of xblock names. """ disabled_block_names = [block.name for block in disabled_xblocks()] - if not libraries_v1_enabled(): - disabled_block_names.append('library') if not libraries_v2_enabled(): disabled_block_names.append('library_v2') disabled_block_names.append('itembank')