Skip to content

Commit

Permalink
Merge pull request #46 from Medality-Health/custom-medality-blocks
Browse files Browse the repository at this point in the history
support custom medality xblocks as 1p blocks
  • Loading branch information
tramck authored Feb 22, 2024
2 parents fe2b462 + 149c134 commit f3ebb02
Showing 1 changed file with 26 additions and 6 deletions.
32 changes: 26 additions & 6 deletions cms/djangoapps/contentstore/views/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,21 @@
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_case_list',
'ambra_quiz',
'case_history',
'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 +308,20 @@ 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_case_list': _("Ambra Case List"),
'case_history': _("Ambra Case History"),
'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 f3ebb02

Please sign in to comment.