This is a first stage for removing the LegacyWaffle* classes. LegacyWaffleFlag usage replaced with WaffleFlag; LegacyWaffleSwitche usage replaced with WaffleSwitch; New CourseWaffleFlag added to the temporary module __future__ as FutureCourseWaffleFlag; Updated all the imports to use CourseWaffleFlag from the __future__ module; BREAKING CHANGE: A number of toggle related constants (e.g. ENABLE_ACCESSIBILITY_POLICY_PAGE) changed types. They were strings, and are now toggle instances (e.g. WaffleSwitch). Although the entire refactor should be self-contained in edx-platform, if any plugins or dependencies were directly using these constants, they will break. If this is the case, try to find a better publicized way of exposing those toggles.
19 lines
617 B
Python
19 lines
617 B
Python
"""
|
|
Miscellaneous waffle switches that both LMS and Studio need to access
|
|
"""
|
|
|
|
|
|
from edx_toggles.toggles import WaffleSwitch
|
|
|
|
# Namespace
|
|
WAFFLE_NAMESPACE = 'course_experience'
|
|
|
|
# Switches
|
|
# .. toggle_name: course_experience.enable_about_sidebar_html
|
|
# .. toggle_implementation: WaffleSwitch
|
|
# .. toggle_default: False
|
|
# .. toggle_description: Used to determine whether to show custom HTML in the sidebar on the internal course about page.
|
|
# .. toggle_use_cases: open_edx
|
|
# .. toggle_creation_date: 2018-01-26
|
|
ENABLE_COURSE_ABOUT_SIDEBAR_HTML = WaffleSwitch(f'{WAFFLE_NAMESPACE}.enable_about_sidebar_html', __name__)
|