From 911602857b41dc150d81e46367a56fa9162fdd54 Mon Sep 17 00:00:00 2001 From: bra-i-am Date: Thu, 22 Feb 2024 08:46:06 -0500 Subject: [PATCH] feat: handle CourseAuthoringMFE activation setting --- cms/lib/utils.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 cms/lib/utils.py diff --git a/cms/lib/utils.py b/cms/lib/utils.py new file mode 100644 index 0000000000..cabd7d6325 --- /dev/null +++ b/cms/lib/utils.py @@ -0,0 +1,20 @@ +""" +Helper methods for the CMS. +""" + +from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers + + +def use_course_authoring_mfe(org) -> bool: + """ + Checks with the org if the tenant enables the + Course Authoring MFE. + Returns: + True if the MFE setting is activated, by default + the MFE is deactivated + """ + use_course_authoring_legacy = configuration_helpers.get_value_for_org( + org, "ENABLE_COURSE_AUTHORING_MFE", False + ) + + return bool(use_course_authoring_legacy)