-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add a new tenant setting to enable the Course Authoring MFE
* fix: modify some test to be according to the new behavior
- Loading branch information
Showing
5 changed files
with
43 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
""" | ||
Helper methods for the CMS. | ||
""" | ||
|
||
from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers | ||
from edx_toggles.toggles import SettingDictToggle | ||
|
||
|
||
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 | ||
""" | ||
|
||
ENABLE_MFE_FOR_TESTING = SettingDictToggle( | ||
"FEATURES", "ENABLE_MFE_FOR_TESTING", default=False, module_name=__name__ | ||
).is_enabled() | ||
|
||
use_microfrontend = configuration_helpers.get_value_for_org( | ||
org, "ENABLE_COURSE_AUTHORING_MFE", ENABLE_MFE_FOR_TESTING or False | ||
) | ||
|
||
print("=====================================\nIS WORKING\n=============================\nTHE VALUE IS\n", use_microfrontend) | ||
|
||
return bool(use_microfrontend) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters