Skip to content

Commit

Permalink
refactor: rename toggle_warnings to toggle_warning (openedx#30458)
Browse files Browse the repository at this point in the history
Rename toggle_warnings to toggle_warning for consistency with setting_warning.
  • Loading branch information
dyudyunov authored May 24, 2022
1 parent e25e17e commit b4fecd6
Show file tree
Hide file tree
Showing 35 changed files with 104 additions and 104 deletions.
4 changes: 2 additions & 2 deletions cms/djangoapps/contentstore/config/waffle.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
# .. toggle_use_cases: temporary, open_edx
# .. toggle_creation_date: 2020-08-03
# .. toggle_target_removal_date: 2020-12-31
# .. toggle_warnings: Also set settings.LIBRARY_AUTHORING_MICROFRONTEND_URL and ENABLE_LIBRARY_AUTHORING_MICROFRONTEND.
# .. toggle_warning: Also set settings.LIBRARY_AUTHORING_MICROFRONTEND_URL and ENABLE_LIBRARY_AUTHORING_MICROFRONTEND.
# .. toggle_tickets: https://openedx.atlassian.net/wiki/spaces/COMM/pages/1545011241/BD-14+Blockstore+Powered+Content+Libraries+Taxonomies
REDIRECT_TO_LIBRARY_AUTHORING_MICROFRONTEND = WaffleFlag(
f'{WAFFLE_NAMESPACE}.library_authoring_mfe', __name__, LOG_PREFIX
Expand All @@ -50,6 +50,6 @@
# .. toggle_use_cases: temporary
# .. toggle_creation_date: 2021-07-12
# .. toggle_target_removal_date: 2021-12-31
# .. toggle_warnings: Flag course_experience.relative_dates should also be active for relative dates functionalities to work.
# .. toggle_warning: Flag course_experience.relative_dates should also be active for relative dates functionalities to work.
# .. toggle_tickets: https://openedx.atlassian.net/browse/AA-844
CUSTOM_RELATIVE_DATES = CourseWaffleFlag(f'{WAFFLE_NAMESPACE}.custom_relative_dates', __name__)
10 changes: 5 additions & 5 deletions cms/djangoapps/contentstore/toggles.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# valid "giturl" attribute. Exporting a course to git causes the course to be exported in the directory indicated by
# the GIT_REPO_EXPORT_DIR setting. Note that when this feature is disabled, courses can still be exported to git with
# the git_export management command.
# .. toggle_warnings: To enable this feature, the GIT_REPO_EXPORT_DIR setting must be properly defined and point to an
# .. toggle_warning: To enable this feature, the GIT_REPO_EXPORT_DIR setting must be properly defined and point to an
# existing directory.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2014-02-13
Expand Down Expand Up @@ -70,7 +70,7 @@ def bypass_olx_failure_enabled():
# .. toggle_implementation: SettingDictToggle
# .. toggle_default: False
# .. toggle_description: When enabled, users can access the new course authoring view for proctoring exams
# .. toggle_warnings: None
# .. toggle_warning: None
# .. toggle_creation_date: 2020-07-23
ENABLE_EXAM_SETTINGS_HTML_VIEW = SettingDictToggle(
"FEATURES", "ENABLE_EXAM_SETTINGS_HTML_VIEW", default=False, module_name=__name__
Expand All @@ -92,7 +92,7 @@ def exam_setting_view_enabled():
# .. toggle_creation_date: 2021-12-1
# .. toggle_target_removal_date: 2022-1-30
# .. toggle_tickets: TNL-9306
# .. toggle_warnings:
# .. toggle_warning:
ENABLE_NEW_TEXT_EDITOR_FLAG = WaffleFlag('new_core_editors.use_new_text_editor', __name__)


Expand All @@ -111,7 +111,7 @@ def use_new_text_editor():
# .. toggle_creation_date: 2021-12-1
# .. toggle_target_removal_date: 2022-1-30
# .. toggle_tickets: TNL-9306
# .. toggle_warnings:
# .. toggle_warning:
ENABLE_NEW_VIDEO_EDITOR_FLAG = WaffleFlag('new_core_editors.use_new_video_editor', __name__)


Expand All @@ -130,7 +130,7 @@ def use_new_video_editor():
# .. toggle_creation_date: 2021-12-1
# .. toggle_target_removal_date: 2022-1-30
# .. toggle_tickets: TNL-9306
# .. toggle_warnings:
# .. toggle_warning:
ENABLE_NEW_PROBLEM_EDITOR_FLAG = WaffleFlag('new_core_editors.use_new_problem_editor', __name__)


Expand Down
18 changes: 9 additions & 9 deletions cms/envs/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@
# .. toggle_creation_date: 2020-03-03
# .. toggle_target_removal_date: None
# .. toggle_tickets: https://openedx.atlassian.net/browse/EDUCATOR-4951
# .. toggle_warnings: This temporary feature toggle does not have a target removal date.
# .. toggle_warning: This temporary feature toggle does not have a target removal date.
'ENABLE_ORA_ALL_FILE_URLS': False,

# .. toggle_name: FEATURES['ENABLE_ORA_USER_STATE_UPLOAD_DATA']
Expand All @@ -416,7 +416,7 @@
# .. toggle_creation_date: 2020-03-03
# .. toggle_target_removal_date: None
# .. toggle_tickets: https://openedx.atlassian.net/browse/EDUCATOR-4951
# .. toggle_warnings: This temporary feature toggle does not have a target removal date.
# .. toggle_warning: This temporary feature toggle does not have a target removal date.
'ENABLE_ORA_USER_STATE_UPLOAD_DATA': False,

# .. toggle_name: FEATURES['DEPRECATE_OLD_COURSE_KEYS_IN_STUDIO']
Expand All @@ -430,7 +430,7 @@
# .. toggle_use_cases: temporary
# .. toggle_creation_date: 2020-06-12
# .. toggle_target_removal_date: 2021-04-01
# .. toggle_warnings: This can be removed once support is removed for deprecated
# .. toggle_warning: This can be removed once support is removed for deprecated
# course keys.
# .. toggle_tickets: https://openedx.atlassian.net/browse/DEPR-58
'DEPRECATE_OLD_COURSE_KEYS_IN_STUDIO': True,
Expand All @@ -443,7 +443,7 @@
# .. toggle_creation_date: 2020-06-20
# .. toggle_target_removal_date: 2020-12-31
# .. toggle_tickets: https://openedx.atlassian.net/wiki/spaces/COMM/pages/1545011241/BD-14+Blockstore+Powered+Content+Libraries+Taxonomies
# .. toggle_warnings: Also set settings.LIBRARY_AUTHORING_MICROFRONTEND_URL and see
# .. toggle_warning: Also set settings.LIBRARY_AUTHORING_MICROFRONTEND_URL and see
# REDIRECT_TO_LIBRARY_AUTHORING_MICROFRONTEND for rollout.
'ENABLE_LIBRARY_AUTHORING_MICROFRONTEND': False,

Expand All @@ -456,7 +456,7 @@
# otherwise the course creation functionality will work as it should.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2013-12-02
# .. toggle_warnings: Another toggle DISABLE_LIBRARY_CREATION overrides DISABLE_COURSE_CREATION, if present.
# .. toggle_warning: Another toggle DISABLE_LIBRARY_CREATION overrides DISABLE_COURSE_CREATION, if present.
'DISABLE_COURSE_CREATION': False,

# Can be turned off to disable the help link in the navbar
Expand Down Expand Up @@ -501,7 +501,7 @@
# .. toggle_creation_date: 2022-03-22
# .. toggle_target_removal_date: None
# .. toggle_tickets: https://github.com/edx/edx-platform/pull/28268
# .. toggle_warnings: For consistency in user-experience, keep the value in sync with the setting of the same name
# .. toggle_warning: For consistency in user-experience, keep the value in sync with the setting of the same name
# in the LMS and CMS.
'MARK_LIBRARY_CONTENT_BLOCK_COMPLETE_ON_VIEW': False,

Expand All @@ -512,7 +512,7 @@
# This also hides the "Unenroll" button on the Learner Dashboard.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2021-10-11
# .. toggle_warnings: For consistency in user experience, keep the value in sync with the setting of the same name
# .. toggle_warning: For consistency in user experience, keep the value in sync with the setting of the same name
# in the LMS and CMS.
# .. toggle_tickets: 'https://github.com/open-craft/edx-platform/pull/429'
'DISABLE_UNENROLLMENT': False,
Expand Down Expand Up @@ -2578,7 +2578,7 @@
# .. toggle_use_cases: temporary
# .. toggle_creation_date: 2019-12-02
# .. toggle_target_removal_date: 2020-06-01
# .. toggle_warnings: This url can be removed once it no longer has any real traffic.
# .. toggle_warning: This url can be removed once it no longer has any real traffic.
# .. toggle_tickets: ARCH-1253
DISABLE_DEPRECATED_SIGNIN_URL = False

Expand All @@ -2589,7 +2589,7 @@
# .. toggle_use_cases: temporary
# .. toggle_creation_date: 2019-12-02
# .. toggle_target_removal_date: 2020-06-01
# .. toggle_warnings: This url can be removed once it no longer has any real traffic.
# .. toggle_warning: This url can be removed once it no longer has any real traffic.
# .. toggle_tickets: ARCH-1253
DISABLE_DEPRECATED_SIGNUP_URL = False

Expand Down
2 changes: 1 addition & 1 deletion common/djangoapps/course_modes/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# .. toggle_creation_date: 2021-8-23
# .. toggle_target_removal_date: None
# .. toggle_tickets: REV-2133
# .. toggle_warnings: This temporary feature toggle does not have a target removal date.
# .. toggle_warning: This temporary feature toggle does not have a target removal date.
VALUE_PROP_TRACK_SELECTION_FLAG = WaffleFlag('course_modes.use_new_track_selection', __name__)


Expand Down
2 changes: 1 addition & 1 deletion common/djangoapps/student/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
# .. toggle_implementation: WaffleSwitch
# .. toggle_default: False
# .. toggle_description: This toggle will enable the rendering of the admin view of the CourseEnrollment model.
# .. toggle_warnings: Enabling this toggle may cause performance problems. The CourseEnrollment admin view
# .. toggle_warning: Enabling this toggle may cause performance problems. The CourseEnrollment admin view
# makes DB queries that could cause site outages for a large enough Open edX installation.
# .. toggle_use_cases: opt_in, open_edx
# .. toggle_creation_date: 2018-08-01
Expand Down
4 changes: 2 additions & 2 deletions doc.rst.j2
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ These are all of our well-documented feature toggles!

* Type: {{ group.toggle_type[0] }}
* Use cases: {{ group.toggle_use_cases|join(", ") }}
{% if group.toggle_warnings != 'None' -%}
* Warnings: {{ group.toggle_warnings }}
{% if group.toggle_warning != 'None' -%}
* Warnings: {{ group.toggle_warning }}
{% endif -%}
{% if group.toggle_target_removal_date != 'None' -%}
* Expiration date: {{ group.toggle_target_removal_date }}
Expand Down
2 changes: 1 addition & 1 deletion lms/djangoapps/course_api/blocks/toggles.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# .. 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.
# .. toggle_warning: 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__
)
8 changes: 4 additions & 4 deletions lms/djangoapps/courseware/toggles.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# .. toggle_use_cases: open_edx, temporary
# .. toggle_creation_date: 2020-10-02
# .. toggle_target_removal_date: None
# .. toggle_warnings: Also set settings.LEARNING_MICROFRONTEND_URL.
# .. toggle_warning: Also set settings.LEARNING_MICROFRONTEND_URL.
# .. toggle_tickets: AA-188
COURSEWARE_MICROFRONTEND_COURSE_EXIT_PAGE = CourseWaffleFlag(
f'{WAFFLE_FLAG_NAMESPACE}.microfrontend_course_exit_page', __name__
Expand All @@ -33,7 +33,7 @@
# .. toggle_use_cases: temporary, open_edx
# .. toggle_creation_date: 2020-10-07
# .. toggle_target_removal_date: none
# .. toggle_warnings: Also set settings.LEARNING_MICROFRONTEND_URL.
# .. toggle_warning: Also set settings.LEARNING_MICROFRONTEND_URL.
# .. toggle_tickets: AA-371
COURSEWARE_MICROFRONTEND_PROGRESS_MILESTONES = CourseWaffleFlag(
f'{WAFFLE_FLAG_NAMESPACE}.mfe_progress_milestones', __name__
Expand All @@ -48,7 +48,7 @@
# .. toggle_use_cases: temporary, open_edx
# .. toggle_creation_date: 2021-02-16
# .. toggle_target_removal_date: None
# .. toggle_warnings: Also set settings.LEARNING_MICROFRONTEND_URL and
# .. toggle_warning: Also set settings.LEARNING_MICROFRONTEND_URL and
# COURSEWARE_MICROFRONTEND_PROGRESS_MILESTONES.
# .. toggle_tickets: AA-304
COURSEWARE_MICROFRONTEND_PROGRESS_MILESTONES_STREAK_CELEBRATION = CourseWaffleFlag(
Expand All @@ -59,7 +59,7 @@
# .. toggle_implementation: CourseWaffleFlag
# .. toggle_default: False
# .. toggle_description: This flag enables an engagement discount incentive message.
# .. toggle_warnings: This flag depends on the streak celebration feature being enabled
# .. toggle_warning: This flag depends on the streak celebration feature being enabled
# .. toggle_use_cases: opt_out, open_edx
# .. toggle_creation_date: 2021-08-26
# .. toggle_target_removal_date: None
Expand Down
6 changes: 3 additions & 3 deletions lms/djangoapps/experiments/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
# .. toggle_creation_date: 2019-2-25
# .. toggle_target_removal_date: None
# .. toggle_tickets: REVEM-63, REVEM-198
# .. toggle_warnings: This temporary feature toggle does not have a target removal date.
# .. toggle_warning: This temporary feature toggle does not have a target removal date.
PROGRAM_INFO_FLAG = WaffleFlag(
'experiments.add_programs',
__name__,
Expand All @@ -49,7 +49,7 @@
# .. toggle_creation_date: 2019-3-28
# .. toggle_target_removal_date: None
# .. toggle_tickets: REVEM-118
# .. toggle_warnings: This temporary feature toggle does not have a target removal date.
# .. toggle_warning: This temporary feature toggle does not have a target removal date.
DASHBOARD_INFO_FLAG = WaffleFlag('experiments.add_dashboard_info', __name__)
# TODO END: clean up as part of REVEM-199 (End)

Expand All @@ -62,7 +62,7 @@
# .. toggle_creation_date: 2020-7-7
# .. toggle_target_removal_date: None
# .. toggle_tickets: REV-1205
# .. toggle_warnings: This temporary feature toggle does not have a target removal date.
# .. toggle_warning: This temporary feature toggle does not have a target removal date.
UPSELL_TRACKING_FLAG = WaffleFlag(
'experiments.add_upsell_tracking',
__name__,
Expand Down
2 changes: 1 addition & 1 deletion lms/djangoapps/experiments/views_custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
# .. toggle_creation_date: 2019-09-05
# .. toggle_target_removal_date: None
# .. toggle_tickets: REV-934
# .. toggle_warnings: This temporary feature toggle does not have a target removal date.
# .. toggle_warning: This temporary feature toggle does not have a target removal date.
MOBILE_UPSELL_FLAG = WaffleFlag('experiments.mobile_upsell_rev934', __name__)
MOBILE_UPSELL_EXPERIMENT = 'mobile_upsell_experiment'

Expand Down
4 changes: 2 additions & 2 deletions lms/djangoapps/grades/config/waffle.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2017-04-11
# .. toggle_tickets: https://github.com/edx/edx-platform/pull/14771
# .. toggle_warnings: This requires the PersistentGradesEnabledFlag to be enabled.
# .. toggle_warning: This requires the PersistentGradesEnabledFlag to be enabled.
ASSUME_ZERO_GRADE_IF_ABSENT = WaffleSwitch(f'{WAFFLE_NAMESPACE}.assume_zero_grade_if_absent', __name__)
# .. toggle_name: grades.disable_regrade_on_policy_change
# .. toggle_implementation: WaffleSwitch
Expand Down Expand Up @@ -69,7 +69,7 @@
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2018-10-03
# .. toggle_tickets: https://github.com/edx/edx-platform/pull/19054
# .. toggle_warnings: Enabling this requires that the `WRITABLE_GRADEBOOK_URL` setting be properly defined.
# .. toggle_warning: Enabling this requires that the `WRITABLE_GRADEBOOK_URL` setting be properly defined.
# TODO: After removing this flag, add a migration to remove waffle flag in a follow-up deployment.
WRITABLE_GRADEBOOK = CourseWaffleFlag(f'{WAFFLE_NAMESPACE}.writable_gradebook', __name__, LOG_PREFIX)

Expand Down
2 changes: 1 addition & 1 deletion lms/djangoapps/instructor/toggles.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
# .. toggle_description: Supports staged rollout to improved is_small_course method.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2020-07-02
# .. toggle_warnings: Description mentions staged rollout, but the use case is not set as temporary.
# .. toggle_warning: Description mentions staged rollout, but the use case is not set as temporary.
# This may actually be a temporary toggle.
# .. toggle_tickets: PROD-1740
OPTIMISED_IS_SMALL_COURSE = WaffleFlag(f'{WAFFLE_FLAG_NAMESPACE}.optimised_is_small_course', __name__)
Expand Down
4 changes: 2 additions & 2 deletions lms/djangoapps/learner_dashboard/config/waffle.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# .. toggle_use_cases: temporary, open_edx
# .. toggle_creation_date: 2021-08-25
# .. toggle_target_removal_date: 2021-12-31
# .. toggle_warnings: When the flag is ON, the new experience for Program discussions will be enabled.
# .. toggle_warning: When the flag is ON, the new experience for Program discussions will be enabled.
# .. toggle_tickets: TNL-8434
ENABLE_PROGRAM_TAB_VIEW = WaffleFlag(
'learner_dashboard.enable_program_tab_view',
Expand All @@ -31,7 +31,7 @@
# .. toggle_use_cases: temporary, open_edx
# .. toggle_creation_date: 2021-10-19
# .. toggle_target_removal_date: 2021-12-31
# .. toggle_warnings: When the flag is ON, the new tabbed experience for Master Program Page will be enabled.
# .. toggle_warning: When the flag is ON, the new tabbed experience for Master Program Page will be enabled.
# .. toggle_tickets: TNL-8434
ENABLE_MASTERS_PROGRAM_TAB_VIEW = WaffleFlag(
'learner_dashboard.enable_masters_program_tab_view',
Expand Down
2 changes: 1 addition & 1 deletion lms/djangoapps/teams/toggles.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# .. toggle_creation_date: 2020-03-03
# .. toggle_target_removal_date: None
# .. toggle_tickets: https://openedx.atlassian.net/browse/EDUCATOR-4951
# .. toggle_warnings: This temporary feature toggle does not have a target removal date. This can be overridden by a
# .. toggle_warning: This temporary feature toggle does not have a target removal date. This can be overridden by a
# course waffle flags or a waffle switch with identical name.
# TODO: this should be moved to edx/edx-ora2
TEAM_SUBMISSIONS_FEATURE = SettingDictToggle(
Expand Down
2 changes: 1 addition & 1 deletion lms/djangoapps/teams/waffle.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# .. toggle_use_cases: temporary, open_edx
# .. toggle_creation_date: 2021-10-07
# .. toggle_target_removal_date: 2021-11-01
# .. toggle_warnings: When the flag is ON, the teams app will be visible in the new course authoring mfe.
# .. toggle_warning: When the flag is ON, the teams app will be visible in the new course authoring mfe.
# .. toggle_tickets: TNL-8816
ENABLE_TEAMS_APP = WaffleFlag(
'teams.enable_teams_app',
Expand Down
2 changes: 1 addition & 1 deletion lms/djangoapps/verify_student/toggles.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# .. toggle_use_cases: temporary, open_edx
# .. toggle_creation_date: 2020-06-25
# .. toggle_target_removal_date: None
# .. toggle_warnings: This temporary feature toggle does not have a target removal date.
# .. toggle_warning: This temporary feature toggle does not have a target removal date.
# .. toggle_tickets: PROD-1639
USE_NEW_EMAIL_TEMPLATES = WaffleFlag(f'{WAFFLE_FLAG_NAMESPACE}.use_new_email_templates', __name__)

Expand Down
Loading

0 comments on commit b4fecd6

Please sign in to comment.