Skip to content

Commit f27193b

Browse files
committed
fix: hide library_v2 and itembank in legacy library page (#35772)
Hide options to add library_v2 and itembank blocks in legacy library page. (cherry picked from commit 68739ce)
1 parent 79886a6 commit f27193b

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

cms/djangoapps/contentstore/views/component.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,14 @@ def create_support_legend_dict():
279279
component_types = COMPONENT_TYPES[:]
280280

281281
# Libraries do not support discussions, drag-and-drop, and openassessment and other libraries
282-
component_not_supported_by_library = ['discussion', 'library', 'openassessment', 'drag-and-drop-v2']
282+
component_not_supported_by_library = [
283+
'discussion',
284+
'library',
285+
'openassessment',
286+
'drag-and-drop-v2',
287+
'library_v2',
288+
'itembank',
289+
]
283290
if library:
284291
component_types = [component for component in component_types
285292
if component not in set(component_not_supported_by_library)]

cms/djangoapps/contentstore/views/tests/test_library.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,8 @@ def test_get_component_templates(self):
403403
self.assertNotIn('advanced', templates)
404404
self.assertNotIn('openassessment', templates)
405405
self.assertNotIn('library', templates)
406+
self.assertNotIn('library_v2', templates)
407+
self.assertNotIn('itembank', templates)
406408

407409
def test_advanced_problem_types(self):
408410
"""

0 commit comments

Comments
 (0)