Skip to content

Commit

Permalink
support custom medality xblocks as 1p blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
Travis McKinney committed Feb 14, 2024
1 parent fe2b462 commit 4c172d7
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions cms/djangoapps/contentstore/views/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,19 @@
log = logging.getLogger(__name__)

# NOTE: This list is disjoint from ADVANCED_COMPONENT_TYPES
COMPONENT_TYPES = ['discussion', 'library', 'html', 'openassessment', 'problem', 'video', 'drag-and-drop-v2']
# @medality_custom
COMPONENT_TYPES = [
'ambra',
'ambra_quiz',
'drag_and_drop',
'html',
'pdf',
'problem',
'select_from_library',
'typeform',
'unit_metadata',
'vimeo',
]

ADVANCED_COMPONENT_TYPES = sorted({name for name, class_ in XBlock.load_classes()} - set(COMPONENT_TYPES))

Expand Down Expand Up @@ -294,14 +306,18 @@ def create_support_legend_dict():
"documentation_label": _("{platform_name} Support Levels:").format(platform_name=settings.PLATFORM_NAME)
}

# @medality_custom
component_display_names = {
'discussion': _("Discussion"),
'ambra': _("Ambra Link"),
'ambra_quiz': _("Ambra Quiz"),
'drag_and_drop': _("Drag and Drop"),
'html': _("Text"),
'pdf': _("PDF"),
'problem': _("Problem"),
'video': _("Video"),
'openassessment': _("Open Response"),
'library': _("Library Content"),
'drag-and-drop-v2': _("Drag and Drop"),
'select_from_library': _("Select from Library"),
'typeform': _("Typeform Embed"),
'unit_metadata': _("Unit Metadata"),
'vimeo': _("Vimeo"),
}

component_templates = []
Expand Down

0 comments on commit 4c172d7

Please sign in to comment.