Skip to content

Commit

Permalink
chore: removed enable_moderation_reason_codes flag from discussion app (
Browse files Browse the repository at this point in the history
#33822)

* chore: removed enable_moderation_reason_codes flag from discussion app
  • Loading branch information
AhtishamShahid authored Dec 6, 2023
1 parent e9941d3 commit 2495120
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 15 deletions.
2 changes: 0 additions & 2 deletions lms/djangoapps/discussion/rest_api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@
has_discussion_privileges,
is_commentable_divided
)
from ..toggles import ENABLE_DISCUSSION_MODERATION_REASON_CODES
from .exceptions import CommentNotFoundError, DiscussionBlackOutException, DiscussionDisabledError, ThreadNotFoundError
from .forms import CommentActionsForm, ThreadActionsForm, UserOrdering
from .pagination import DiscussionAPIPagination
Expand Down Expand Up @@ -365,7 +364,6 @@ def _format_datetime(dt):
"enable_in_context": course_config.enable_in_context,
"group_at_subsection": course_config.plugin_configuration.get("group_at_subsection", False),
'learners_tab_enabled': ENABLE_LEARNERS_TAB_IN_DISCUSSIONS_MFE.is_enabled(course_key),
"reason_codes_enabled": ENABLE_DISCUSSION_MODERATION_REASON_CODES.is_enabled(course_key),
"edit_reasons": [
{"code": reason_code, "label": label}
for (reason_code, label) in EDIT_REASON_CODES.items()
Expand Down
1 change: 0 additions & 1 deletion lms/djangoapps/discussion/rest_api/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,6 @@ def test_basic(self):
'is_user_admin': False,
'user_roles': {'Student'},
'learners_tab_enabled': False,
'reason_codes_enabled': False,
'edit_reasons': [{'code': 'test-edit-reason', 'label': 'Test Edit Reason'}],
'post_close_reasons': [{'code': 'test-close-reason', 'label': 'Test Close Reason'}],
}
Expand Down
1 change: 0 additions & 1 deletion lms/djangoapps/discussion/rest_api/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,6 @@ def test_basic(self):
'is_user_admin': False,
"user_roles": ["Student"],
'learners_tab_enabled': False,
"reason_codes_enabled": False,
"edit_reasons": [{"code": "test-edit-reason", "label": "Test Edit Reason"}],
"post_close_reasons": [{"code": "test-close-reason", "label": "Test Close Reason"}],
}
Expand Down
11 changes: 0 additions & 11 deletions lms/djangoapps/discussion/toggles.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,6 @@
f'{WAFFLE_FLAG_NAMESPACE}.enable_learners_tab_in_discussions_mfe', __name__
)

# .. toggle_name: discussions.enable_moderation_reason_codes
# .. toggle_implementation: CourseWaffleFlag
# .. toggle_default: False
# .. toggle_description: Waffle flag to toggle support for the new edit and post close reason codes
# .. toggle_use_cases: temporary, open_edx
# .. toggle_creation_date: 2022-02-22
# .. toggle_target_removal_date: 2022-09-22
ENABLE_DISCUSSION_MODERATION_REASON_CODES = CourseWaffleFlag(
f'{WAFFLE_FLAG_NAMESPACE}.enable_moderation_reason_codes', __name__
)

# .. toggle_name: discussions.enable_reported_content_email_notifications
# .. toggle_implementation: CourseWaffleFlag
# .. toggle_default: False
Expand Down

0 comments on commit 2495120

Please sign in to comment.