From 122ae72403184ff236ff7947e75030bc55fbcdca Mon Sep 17 00:00:00 2001 From: Raymond Zhou <56318341+rayzhou-bit@users.noreply.github.com> Date: Thu, 27 Jul 2023 13:20:26 -0400 Subject: [PATCH] feat: add game block button waffle flag checks (#32859) --- cms/djangoapps/contentstore/toggles.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/cms/djangoapps/contentstore/toggles.py b/cms/djangoapps/contentstore/toggles.py index 438f99f97b..4f84e7bf9e 100644 --- a/cms/djangoapps/contentstore/toggles.py +++ b/cms/djangoapps/contentstore/toggles.py @@ -159,6 +159,25 @@ def use_new_problem_editor(): return ENABLE_NEW_PROBLEM_EDITOR_FLAG.is_enabled() +# .. toggle_name: new_editors.add_game_block_button +# .. toggle_implementation: WaffleFlag +# .. toggle_default: False +# .. toggle_description: This flag enables the creation of the new games block +# .. toggle_use_cases: temporary +# .. toggle_creation_date: 2023-07-26 +# .. toggle_target_removal_date: 2023-09-31 +# .. toggle_tickets: TNL-10924 +# .. toggle_warning: +ENABLE_ADD_GAME_BLOCK_FLAG = WaffleFlag('new_editors.add_game_block_button', __name__) + + +def use_add_game_block(): + """ + Returns a boolean if add game block button is enabled + """ + return ENABLE_ADD_GAME_BLOCK_FLAG.is_enabled() + + # .. toggle_name: contentstore.individualize_anonymous_user_id # .. toggle_implementation: CourseWaffleFlag # .. toggle_default: False