Skip to content

Commit

Permalink
fix: hide library_v2 and itembank in legacy library page (#35772)
Browse files Browse the repository at this point in the history
Hide options to add library_v2 and itembank blocks in legacy library
page.
  • Loading branch information
navinkarkera authored Nov 12, 2024
1 parent a816d75 commit 68739ce
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 8 additions & 1 deletion cms/djangoapps/contentstore/views/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,14 @@ def create_support_legend_dict():
component_types = COMPONENT_TYPES[:]

# Libraries do not support discussions, drag-and-drop, and openassessment and other libraries
component_not_supported_by_library = ['discussion', 'library', 'openassessment', 'drag-and-drop-v2']
component_not_supported_by_library = [
'discussion',
'library',
'openassessment',
'drag-and-drop-v2',
'library_v2',
'itembank',
]
if library:
component_types = [component for component in component_types
if component not in set(component_not_supported_by_library)]
Expand Down
2 changes: 2 additions & 0 deletions cms/djangoapps/contentstore/views/tests/test_library.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,8 @@ def test_get_component_templates(self):
self.assertNotIn('advanced', templates)
self.assertNotIn('openassessment', templates)
self.assertNotIn('library', templates)
self.assertNotIn('library_v2', templates)
self.assertNotIn('itembank', templates)

def test_advanced_problem_types(self):
"""
Expand Down

0 comments on commit 68739ce

Please sign in to comment.