Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def get_enable_course_optimizer(self, obj):

def get_use_react_markdown_editor(self, obj):
"""
Method to get the use_react_markdown_editor waffle flag
Determine whether the new markdown editor should be enabled in the react problem editor
"""
course_key = self.get_course_key()
return toggles.use_react_markdown_editor(course_key)
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class CourseWaffleFlagsViewTest(CourseTestCase):
'use_new_unit_page': True,
'use_new_updates_page': True,
'use_new_video_uploads_page': False,
'use_react_markdown_editor': False,
'use_react_markdown_editor': True,
}

def setUp(self):
Expand Down
12 changes: 6 additions & 6 deletions cms/djangoapps/contentstore/toggles.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,22 +219,22 @@ def use_new_custom_pages(course_key):
return not LEGACY_STUDIO_CUSTOM_PAGES.is_enabled(course_key)


# .. toggle_name: contentstore.use_react_markdown_editor
# .. toggle_name: contentstore.disable_react_markdown_editor
# .. toggle_implementation: CourseWaffleFlag
# .. toggle_default: False
# .. toggle_description: This flag enables the use of the Markdown editor when creating or editing problems in the authoring MFE
# .. toggle_use_cases: opt_in
# .. toggle_description: This flag disables the use of the Markdown editor when creating or editing problems in the authoring MFE
# .. toggle_use_cases: opt_out
# .. toggle_creation_date: 2025-4-11
# .. toggle_tickets: https://openedx.atlassian.net/wiki/spaces/OEPM/pages/4517232656/Re-enable+Markdown+editing+of+CAPA+problems+to+meet+various+use+cases
ENABLE_REACT_MARKDOWN_EDITOR = CourseWaffleFlag(
f'{CONTENTSTORE_NAMESPACE}.use_react_markdown_editor', __name__)
DISABLE_REACT_MARKDOWN_EDITOR = CourseWaffleFlag(
f'{CONTENTSTORE_NAMESPACE}.disable_react_markdown_editor', __name__)


def use_react_markdown_editor(course_key):
"""
Returns a boolean if new studio custom pages mfe is enabled
"""
return ENABLE_REACT_MARKDOWN_EDITOR.is_enabled(course_key)
return not DISABLE_REACT_MARKDOWN_EDITOR.is_enabled(course_key)


# .. toggle_name: legacy_studio.schedule_details
Expand Down
Loading