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.
21 lines
657 B
Python
21 lines
657 B
Python
"""
|
|
Toggles for Course API.
|
|
"""
|
|
|
|
|
|
from edx_toggles.toggles import WaffleFlag
|
|
|
|
COURSE_BLOCKS_API_NAMESPACE = 'course_blocks_api'
|
|
|
|
# .. toggle_name: course_blocks_api.hide_access_denials
|
|
# .. toggle_implementation: WaffleFlag
|
|
# .. toggle_default: False
|
|
# .. toggle_description: Waffle flag to hide access denial messages in the course blocks.
|
|
# .. toggle_use_cases: temporary, open_edx
|
|
# .. toggle_creation_date: 2019-09-27
|
|
# .. toggle_target_removal_date: None
|
|
# .. toggle_warnings: This temporary feature toggle does not have a target removal date.
|
|
HIDE_ACCESS_DENIALS_FLAG = WaffleFlag(
|
|
f'{COURSE_BLOCKS_API_NAMESPACE}.hide_access_denials', __name__
|
|
)
|