diff --git a/README.rst b/README.rst index 1b05dfa..9943fba 100644 --- a/README.rst +++ b/README.rst @@ -19,6 +19,10 @@ Usage tutor plugins enable notifications +The email and push notification settings under Account can be enabled/disabled using `NOTIFICATIONS_ENABLE_SHOW_EMAIL_CHANNEL` +and `NOTIFICATIONS_ENABLE_SHOW_PUSH_CHANNEL`. `NOTIFICATIONS_ENABLE_SHOW_EMAIL_CHANNEL` is set to True while `NOTIFICATIONS_ENABLE_SHOW_PUSH_CHANNEL` +is set to False by default. + License ******* diff --git a/tutornotifications/patches/mfe-lms-production-settings b/tutornotifications/patches/mfe-lms-production-settings index 01d2894..7bc43a3 100644 --- a/tutornotifications/patches/mfe-lms-production-settings +++ b/tutornotifications/patches/mfe-lms-production-settings @@ -1,2 +1,3 @@ -MFE_CONFIG["SHOW_EMAIL_CHANNEL"] = True +MFE_CONFIG["SHOW_EMAIL_CHANNEL"] = {{ NOTIFICATIONS_ENABLE_SHOW_EMAIL_CHANNEL }} +MFE_CONFIG["SHOW_PUSH_CHANNEL"] = {{ NOTIFICATIONS_ENABLE_SHOW_PUSH_CHANNEL }} diff --git a/tutornotifications/plugin.py b/tutornotifications/plugin.py index ed2bbde..5eadefe 100644 --- a/tutornotifications/plugin.py +++ b/tutornotifications/plugin.py @@ -17,6 +17,8 @@ # Each new setting is a pair: (setting_name, default_value). # Prefix your setting names with 'NOTIFICATIONS_'. ("NOTIFICATIONS_VERSION", __version__), + ("NOTIFICATIONS_ENABLE_SHOW_EMAIL_CHANNEL", True), + ("NOTIFICATIONS_ENABLE_SHOW_PUSH_CHANNEL", False), ] ) @@ -133,6 +135,5 @@ "org.openedx.frontend.layout.studio_header_search_button_slot.v1", notification_drawer_config, ), - ], )