From 4c172d7935303fc2f35a3e871a694f7ceed08c3f Mon Sep 17 00:00:00 2001 From: Travis McKinney Date: Wed, 14 Feb 2024 18:43:17 +0000 Subject: [PATCH 1/5] support custom medality xblocks as 1p blocks --- .../contentstore/views/component.py | 28 +++++++++++++++---- 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/cms/djangoapps/contentstore/views/component.py b/cms/djangoapps/contentstore/views/component.py index eff99e009b5b..bf449a782909 100644 --- a/cms/djangoapps/contentstore/views/component.py +++ b/cms/djangoapps/contentstore/views/component.py @@ -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)) @@ -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 = [] From 1cdeb828162fb611e501ca83263f98752d14127d Mon Sep 17 00:00:00 2001 From: Travis McKinney Date: Wed, 14 Feb 2024 18:50:58 +0000 Subject: [PATCH 2/5] add ambra_case_list --- cms/djangoapps/contentstore/views/component.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cms/djangoapps/contentstore/views/component.py b/cms/djangoapps/contentstore/views/component.py index bf449a782909..11520246be1b 100644 --- a/cms/djangoapps/contentstore/views/component.py +++ b/cms/djangoapps/contentstore/views/component.py @@ -47,6 +47,7 @@ # @medality_custom COMPONENT_TYPES = [ 'ambra', + 'ambra_case_list', 'ambra_quiz', 'drag_and_drop', 'html', @@ -309,6 +310,7 @@ def create_support_legend_dict(): # @medality_custom component_display_names = { 'ambra': _("Ambra Link"), + 'ambra_case_list': _("Ambra Case List"), 'ambra_quiz': _("Ambra Quiz"), 'drag_and_drop': _("Drag and Drop"), 'html': _("Text"), From 7e2c4b2bd0e9bbf89ffe59498ba16a91233b0bd0 Mon Sep 17 00:00:00 2001 From: Travis McKinney Date: Fri, 16 Feb 2024 14:24:21 +0000 Subject: [PATCH 3/5] add case history --- cms/djangoapps/contentstore/views/component.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cms/djangoapps/contentstore/views/component.py b/cms/djangoapps/contentstore/views/component.py index 11520246be1b..4ec79c6ad425 100644 --- a/cms/djangoapps/contentstore/views/component.py +++ b/cms/djangoapps/contentstore/views/component.py @@ -49,6 +49,7 @@ 'ambra', 'ambra_case_list', 'ambra_quiz', + 'case_history', 'drag_and_drop', 'html', 'pdf', @@ -311,6 +312,7 @@ def create_support_legend_dict(): component_display_names = { '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"), From a94f34ea24b0310396ace5d84fd3c78577949b53 Mon Sep 17 00:00:00 2001 From: Travis McKinney Date: Tue, 20 Feb 2024 17:50:39 +0000 Subject: [PATCH 4/5] studio modal height --- cms/static/sass/elements/_modal-window.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cms/static/sass/elements/_modal-window.scss b/cms/static/sass/elements/_modal-window.scss index b6508ef49a01..f195c33ada39 100644 --- a/cms/static/sass/elements/_modal-window.scss +++ b/cms/static/sass/elements/_modal-window.scss @@ -300,7 +300,7 @@ } .modal-content { - height: 435px; + height: calc(100vh - 100px); overflow-y: auto; overflow-x: hidden; padding: 0; From 149c1346ecc36eedfa9ae0d1a0a606ca55885b66 Mon Sep 17 00:00:00 2001 From: Travis McKinney Date: Tue, 20 Feb 2024 19:48:10 +0000 Subject: [PATCH 5/5] revert modal height --- cms/static/sass/elements/_modal-window.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cms/static/sass/elements/_modal-window.scss b/cms/static/sass/elements/_modal-window.scss index f195c33ada39..b6508ef49a01 100644 --- a/cms/static/sass/elements/_modal-window.scss +++ b/cms/static/sass/elements/_modal-window.scss @@ -300,7 +300,7 @@ } .modal-content { - height: calc(100vh - 100px); + height: 435px; overflow-y: auto; overflow-x: hidden; padding: 0;