Skip to content

Commit

Permalink
refactor: deprecated course update notification waffle flag (#35190)
Browse files Browse the repository at this point in the history
  • Loading branch information
eemaanamir authored Jul 30, 2024
1 parent 8d0ada5 commit 085a2f5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 18 deletions.
13 changes: 0 additions & 13 deletions cms/djangoapps/contentstore/config/waffle.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,3 @@
# .. 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__)


# .. toggle_name: studio.enable_course_update_notifications
# .. toggle_implementation: CourseWaffleFlag
# .. toggle_default: False
# .. toggle_description: Waffle flag to enable course update notifications.
# .. toggle_use_cases: temporary, open_edx
# .. toggle_creation_date: 14-Feb-2024
# .. toggle_target_removal_date: 14-Mar-2024
ENABLE_COURSE_UPDATE_NOTIFICATIONS = CourseWaffleFlag(
f'{WAFFLE_NAMESPACE}.enable_course_update_notifications',
__name__
)
8 changes: 3 additions & 5 deletions cms/djangoapps/contentstore/course_info_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
from django.http import HttpResponseBadRequest
from django.utils.translation import gettext as _

from cms.djangoapps.contentstore.config.waffle import ENABLE_COURSE_UPDATE_NOTIFICATIONS
from cms.djangoapps.contentstore.utils import track_course_update_event, send_course_update_notification
from openedx.core.lib.xblock_utils import get_course_update_items
from xmodule.html_block import CourseInfoBlock # lint-amnesty, pylint: disable=wrong-import-order
Expand Down Expand Up @@ -93,10 +92,9 @@ def update_course_updates(location, update, passed_id=None, user=None, request_m
track_course_update_event(location.course_key, user, course_update_dict)

# send course update notification
if ENABLE_COURSE_UPDATE_NOTIFICATIONS.is_enabled(location.course_key):
send_course_update_notification(
location.course_key, course_update_dict["content"], user,
)
send_course_update_notification(
location.course_key, course_update_dict["content"], user,
)

# remove status key
if "status" in course_update_dict:
Expand Down

0 comments on commit 085a2f5

Please sign in to comment.