From 254167feb63c7c898ea0df3bd552cfbe5e7360b8 Mon Sep 17 00:00:00 2001 From: Muhammad Adeel Tajamul <77053848+muhammadadeeltajamul@users.noreply.github.com> Date: Thu, 24 Apr 2025 12:11:36 +0500 Subject: [PATCH] feat: removed new notification view waffle flag (#36585) --- openedx/core/djangoapps/notifications/config/waffle.py | 10 ---------- openedx/core/djangoapps/notifications/utils.py | 9 +-------- openedx/core/djangoapps/notifications/views.py | 4 +--- 3 files changed, 2 insertions(+), 21 deletions(-) diff --git a/openedx/core/djangoapps/notifications/config/waffle.py b/openedx/core/djangoapps/notifications/config/waffle.py index b74cd84dca..4a1481f6f5 100644 --- a/openedx/core/djangoapps/notifications/config/waffle.py +++ b/openedx/core/djangoapps/notifications/config/waffle.py @@ -49,13 +49,3 @@ ENABLE_ORA_GRADE_NOTIFICATION = CourseWaffleFlag(f"{WAFFLE_NAMESPACE}.enable_ora # .. toggle_warning: When the flag is ON, Notifications Grouping feature is enabled. # .. toggle_tickets: INF-1472 ENABLE_NOTIFICATION_GROUPING = CourseWaffleFlag(f'{WAFFLE_NAMESPACE}.enable_notification_grouping', __name__) - -# .. toggle_name: notifications.enable_new_notification_view -# .. toggle_implementation: WaffleFlag -# .. toggle_default: False -# .. toggle_description: Waffle flag to enable new notification view -# .. toggle_use_cases: temporary, open_edx -# .. toggle_creation_date: 2024-09-30 -# .. toggle_target_removal_date: 2025-10-10 -# .. toggle_tickets: INF-1603 -ENABLE_NEW_NOTIFICATION_VIEW = WaffleFlag(f"{WAFFLE_NAMESPACE}.enable_new_notification_view", __name__) diff --git a/openedx/core/djangoapps/notifications/utils.py b/openedx/core/djangoapps/notifications/utils.py index 014f7461b5..62e51b7ab9 100644 --- a/openedx/core/djangoapps/notifications/utils.py +++ b/openedx/core/djangoapps/notifications/utils.py @@ -6,7 +6,7 @@ from typing import Dict, List, Set from common.djangoapps.student.models import CourseAccessRole, CourseEnrollment from openedx.core.djangoapps.django_comment_common.models import Role -from openedx.core.djangoapps.notifications.config.waffle import ENABLE_NEW_NOTIFICATION_VIEW, ENABLE_NOTIFICATIONS +from openedx.core.djangoapps.notifications.config.waffle import ENABLE_NOTIFICATIONS from openedx.core.lib.cache_utils import request_cached @@ -48,13 +48,6 @@ def get_show_notifications_tray(user): return show_notifications_tray -def get_is_new_notification_view_enabled(): - """ - Returns True if the waffle flag for the new notification view is enabled, False otherwise. - """ - return ENABLE_NEW_NOTIFICATION_VIEW.is_enabled() - - def get_list_in_batches(input_list, batch_size): """ Divides the list of objects into list of list of objects each of length batch_size. diff --git a/openedx/core/djangoapps/notifications/views.py b/openedx/core/djangoapps/notifications/views.py index 805145bf68..b73a76fa5d 100644 --- a/openedx/core/djangoapps/notifications/views.py +++ b/openedx/core/djangoapps/notifications/views.py @@ -39,7 +39,7 @@ from .serializers import ( UserNotificationPreferenceUpdateAllSerializer, UserNotificationPreferenceUpdateSerializer ) -from .utils import get_is_new_notification_view_enabled, get_show_notifications_tray, aggregate_notification_configs, \ +from .utils import get_show_notifications_tray, aggregate_notification_configs, \ filter_out_visible_preferences_by_course_ids from openedx.core.djangoapps.user_api.models import UserPreference from openedx.core.djangoapps.notifications.email import ONE_CLICK_EMAIL_UNSUB_KEY @@ -338,7 +338,6 @@ class NotificationCountView(APIView): ) count_total = 0 show_notifications_tray = get_show_notifications_tray(self.request.user) - is_new_notification_view_enabled = get_is_new_notification_view_enabled() count_by_app_name_dict = { app_name: 0 for app_name in COURSE_NOTIFICATION_APPS @@ -355,7 +354,6 @@ class NotificationCountView(APIView): "count": count_total, "count_by_app_name": count_by_app_name_dict, "notification_expiry_days": settings.NOTIFICATIONS_EXPIRY, - "is_new_notification_view_enabled": is_new_notification_view_enabled })