Skip to content

Commit

Permalink
chore: disable forum digest subscription section by default (#31459)
Browse files Browse the repository at this point in the history
Current State of the feature

Initially, this feature used the Notifier Django app but was deprecated
and removed from the configuration in favor of edx-notifications.
More info about this deprecation can be found in the GitHub issue (
openedx/wg-build-test-release#22).

The edx-notifications app was not supported though, so its repository
was archived and moved to openedx-unsupported/edx-notifications.
Check the deprecation ticket (openedx-unsupported/edx-notifications#253)
and corresponding discussion (https://discuss.openedx.org/t/deprecation-removal-edx-notifications-repository/6748)
for details.

What remains in the edx-platform

The forum initial page contains the how-to info with the notification
preferences toggle.

This section is responsible for toggling the "notification_pref" user
preference (aka NOTIFICATION_PREF_KEY). I didn't find any usage of this
preference across the platform, so I'm suggesting hiding it by default
by setting the ENABLE_FORUM_DAILY_DIGEST setting to `False`.
  • Loading branch information
dyudyunov authored Mar 7, 2023
1 parent a99826b commit c51f0da
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lms/djangoapps/discussion/config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

# .. toggle_name: FEATURES['ENABLE_FORUM_DAILY_DIGEST']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_default: False
# .. toggle_description: Settings for forums/discussions to on/off daily digest
# feature. Set this to True if you want to enable users to subscribe and unsubscribe
# for daily digest. This setting enables deprecation of daily digest.
Expand All @@ -16,4 +16,4 @@

def is_forum_daily_digest_enabled():
"""Returns whether forum notification features should be visible"""
return settings.FEATURES.get('ENABLE_FORUM_DAILY_DIGEST', True)
return settings.FEATURES.get('ENABLE_FORUM_DAILY_DIGEST', False)
1 change: 1 addition & 0 deletions lms/djangoapps/discussion/notification_prefs/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class NotificationPrefViewTest(UrlResetMixin, TestCase): # lint-amnesty, pylint
INITIALIZATION_VECTOR = b"\x00" * 16

@patch.dict("django.conf.settings.FEATURES", {"ENABLE_DISCUSSION_SERVICE": True})
@patch.dict("django.conf.settings.FEATURES", {"ENABLE_FORUM_DAILY_DIGEST": True})
def setUp(self):
super().setUp()
self.user = UserFactory.create(username="testuser")
Expand Down

0 comments on commit c51f0da

Please sign in to comment.