Skip to content

Commit 1f4704c

Browse files
committed
feat: Adds MFE_CONFIG toggle to toggle the settings
Signed-off-by: Farhaan Bukhsh <[email protected]>
1 parent 512a749 commit 1f4704c

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

README.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ Usage
1919
tutor plugins enable notifications
2020
2121
22+
The email and push notification settings under Account can be enabled/disabled using `NOTIFICATIONS_ENABLE_SHOW_EMAIL_CHANNEL`
23+
and `NOTIFICATIONS_ENABLE_SHOW_PUSH_CHANNEL`. `NOTIFICATIONS_ENABLE_SHOW_EMAIL_CHANNEL` is set to True while `NOTIFICATIONS_ENABLE_SHOW_PUSH_CHANNEL`
24+
is set to False by default.
25+
2226
License
2327
*******
2428

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11

2-
MFE_CONFIG["SHOW_EMAIL_CHANNEL"] = True
2+
MFE_CONFIG["SHOW_EMAIL_CHANNEL"] = {{ NOTIFICATIONS_ENABLE_SHOW_EMAIL_CHANNEL }}
3+
MFE_CONFIG["SHOW_PUSH_CHANNEL"] = {{ NOTIFICATIONS_ENABLE_SHOW_PUSH_CHANNEL }}

tutornotifications/plugin.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
# Each new setting is a pair: (setting_name, default_value).
1818
# Prefix your setting names with 'NOTIFICATIONS_'.
1919
("NOTIFICATIONS_VERSION", __version__),
20+
("NOTIFICATIONS_ENABLE_SHOW_EMAIL_CHANNEL", True),
21+
("NOTIFICATIONS_ENABLE_SHOW_PUSH_CHANNEL", False),
2022
]
2123
)
2224

@@ -133,6 +135,5 @@
133135
"org.openedx.frontend.layout.studio_header_search_button_slot.v1",
134136
notification_drawer_config,
135137
),
136-
137138
],
138139
)

0 commit comments

Comments
 (0)