-
Notifications
You must be signed in to change notification settings - Fork 78
chore: Add notification tray how-to #1360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,154 @@ | ||||||||||||||
| .. _Enable Notifications: | ||||||||||||||
|
|
||||||||||||||
| Enable Notifications | ||||||||||||||
| #################### | ||||||||||||||
|
|
||||||||||||||
| .. tags:: site operator, how-to | ||||||||||||||
|
|
||||||||||||||
| :ref:`Notifications <Notifications & Preferences>` keep you informed about activity in your | ||||||||||||||
| courses, alerting you via one or both of in-platform notifications and email notifications. | ||||||||||||||
| They span activities such as Discussions updates, Course updates, and Grading updates. | ||||||||||||||
|
|
||||||||||||||
| The **notification tray** allows learners to access platform notifications from | ||||||||||||||
| the top-right corner of the Open edX interface. **Notification emails** keep them updated when | ||||||||||||||
| they are away from the platform. We do not have support for push notifications for Open edX mobile app at the moment. | ||||||||||||||
|
|
||||||||||||||
| The recommended way to enable notifications is by using the official Tutor | ||||||||||||||
| plugin: | ||||||||||||||
| `tutor-contrib-platform-notifications <https://github.com/openedx/tutor-contrib-notifications>`_. | ||||||||||||||
|
|
||||||||||||||
| Install and enable the plugin | ||||||||||||||
| ***************************** | ||||||||||||||
|
|
||||||||||||||
| Install the plugin: | ||||||||||||||
|
|
||||||||||||||
| .. code-block:: bash | ||||||||||||||
|
|
||||||||||||||
| pip install tutor-contrib-platform-notifications | ||||||||||||||
|
|
||||||||||||||
| Enable the plugin in your Tutor environment: | ||||||||||||||
|
|
||||||||||||||
| .. code-block:: bash | ||||||||||||||
|
|
||||||||||||||
| tutor plugins enable notifications | ||||||||||||||
|
|
||||||||||||||
| When enabled, the plugin automatically: | ||||||||||||||
|
|
||||||||||||||
| - Enables the following waffle flags: | ||||||||||||||
|
|
||||||||||||||
| - ``notifications.enable_notifications`` | ||||||||||||||
| - ``notifications.enable_email_notifications`` | ||||||||||||||
|
|
||||||||||||||
| - Sets the required environment variables for the notifications service | ||||||||||||||
sarina marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||
|
|
||||||||||||||
| - ``SHOW_EMAIL_CHANNEL`` (defaults to TRUE) | ||||||||||||||
| - ``SHOW_PUSH_CHANNEL`` (defaults to FALSE) | ||||||||||||||
|
|
||||||||||||||
| .. important:: | ||||||||||||||
|
|
||||||||||||||
| After enabling the notifications plugin, site operators **must rebuild the | ||||||||||||||
| MFE image** for the notification tray to appear in the user interface. | ||||||||||||||
|
|
||||||||||||||
| Rebuild the MFE image: | ||||||||||||||
|
|
||||||||||||||
| .. code-block:: bash | ||||||||||||||
|
|
||||||||||||||
| tutor images build mfe | ||||||||||||||
|
|
||||||||||||||
|
|
||||||||||||||
| Configure the notifications plugin | ||||||||||||||
| ********************************** | ||||||||||||||
|
|
||||||||||||||
| The notifications plugin exposes several configuration options that can be | ||||||||||||||
| customized through the `Tutor configuration <https://docs.tutor.edly.io/configuration.html#configuration>`_. | ||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
| These options are as follows: | ||||||||||||||
|
|
||||||||||||||
sarina marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||
|
|
||||||||||||||
| NOTIFICATIONS_DEFAULT_FROM_EMAIL | ||||||||||||||
| ================================ | ||||||||||||||
|
|
||||||||||||||
| Specifies the **From** email address used when sending notification emails. | ||||||||||||||
|
|
||||||||||||||
| If not explicitly set, this value defaults to the platform contact email. | ||||||||||||||
|
|
||||||||||||||
|
|
||||||||||||||
| NOTIFICATIONS_ENABLE_SHOW_EMAIL_CHANNEL | ||||||||||||||
| ======================================= | ||||||||||||||
|
|
||||||||||||||
| Controls whether the **Email notifications** toggle is visible on the learner’s | ||||||||||||||
| account settings page. | ||||||||||||||
|
|
||||||||||||||
| - Type: Boolean | ||||||||||||||
| - Default: ``True`` | ||||||||||||||
|
|
||||||||||||||
| When enabled, learners get toggle to opt in or out of receiving email notifications. | ||||||||||||||
|
|
||||||||||||||
| .. important:: | ||||||||||||||
| The Open edX platform does not currently support push notifications for mobile apps. | ||||||||||||||
| This toggle is added as part of ground work for when that support will be built. | ||||||||||||||
|
|
||||||||||||||
| NOTIFICATIONS_ENABLE_SHOW_PUSH_CHANNEL | ||||||||||||||
| ====================================== | ||||||||||||||
|
|
||||||||||||||
| Controls whether the **Push notifications** toggle is visible on the learner’s | ||||||||||||||
| account settings page. | ||||||||||||||
|
|
||||||||||||||
| - Type: Boolean | ||||||||||||||
| - Default: ``False`` | ||||||||||||||
|
|
||||||||||||||
| When enabled, learners get toggle to opt in or out of push notifications. | ||||||||||||||
|
|
||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
| Configure daily and weekly email digests | ||||||||||||||
| **************************************** | ||||||||||||||
|
|
||||||||||||||
| The notifications Tutor plugin does **not** provide built-in configuration for | ||||||||||||||
| cron jobs needed for email digests. However, the Open edX platform supports **daily and weekly | ||||||||||||||
| notification digests** through management commands. | ||||||||||||||
|
|
||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
| .. important:: | ||||||||||||||
| Default preference for email notifications for all users is ``Daily``. | ||||||||||||||
| Therefore, by default, users will not receive any notification emails unless this cron job is configured. | ||||||||||||||
|
|
||||||||||||||
| To enable these digests, site operators must configure `cron jobs <https://www.redhat.com/en/blog/linux-cron-command>`_ on the host machine where tutor | ||||||||||||||
| is being used to deploy the Open edX platform. | ||||||||||||||
|
|
||||||||||||||
| On the Linux host machine site operators need to run `crontab -e` for adding the cron jobs. This command opens up | ||||||||||||||
| an editor where the below mentioned command needs to be written. Site operators can modify these command to customize the | ||||||||||||||
| time to send the notification email. They need to change the command to `tutor local ...` or `tutor k8s ...` depending on | ||||||||||||||
| if they are running the instance locally or using kubernetes. | ||||||||||||||
|
|
||||||||||||||
|
|
||||||||||||||
| Daily email digest | ||||||||||||||
| ================== | ||||||||||||||
|
|
||||||||||||||
| The following cron job sends the daily digest at **10:00 PM**: | ||||||||||||||
|
|
||||||||||||||
| .. code-block:: bash | ||||||||||||||
|
|
||||||||||||||
| 0 22 * * * tutor local run lms ./manage.py lms send_email_digest Daily | ||||||||||||||
|
|
||||||||||||||
|
|
||||||||||||||
| Weekly email digest | ||||||||||||||
| =================== | ||||||||||||||
|
|
||||||||||||||
| The following cron job sends the weekly digest every **Sunday at 10:00 PM**: | ||||||||||||||
|
|
||||||||||||||
| .. code-block:: bash | ||||||||||||||
|
|
||||||||||||||
| 0 22 * * SUN tutor local run lms ./manage.py lms send_email_digest Weekly | ||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I fear most operators will just copy paste this line. And Sunday is not optimal for weekly emails.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. but Friday at 10pm is? That doesn't make sense to me.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @farhaanbukhsh i agree that since defaults match the msg on accounts page, let's leave it as is. I'm not sure about removing the message on accounts page because we don't have a a better alternate until Verawood. @sarina you are right. The day is just my guess. 22:00 UTC had the highest activity on average on the 2U instance. That's where it came from. Open edX's user base is global and therefore we can't select an idea time. This is in phase 3, i'm proposing that we send these emails based on the user's timezone. But that needs some discovery which Ahtisham will do in the next few days. |
||||||||||||||
|
|
||||||||||||||
| .. note:: | ||||||||||||||
|
|
||||||||||||||
| You can change the delivery time by modifying the cron schedule according to | ||||||||||||||
| your operational requirements. For example, `0 22 * * *` schedules the command to run everyday at **10:00 PM** | ||||||||||||||
| this can be modified to run at the hours/days of choice. | ||||||||||||||
|
|
||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @farhaanbukhsh do you think we should add something on the deletion cron job? Or is this something instance operators are familiar with and can add on their own.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The blog link that is added covers a lot of information, so we can skip this |
||||||||||||||
|
|
||||||||||||||
| **Maintenance chart** | ||||||||||||||
|
|
||||||||||||||
| +--------------+-------------------------------+----------------+--------------------------------+ | ||||||||||||||
| | Review Date | Working Group Reviewer | Release |Test situation | | ||||||||||||||
| +--------------+-------------------------------+----------------+--------------------------------+ | ||||||||||||||
| |2025-12-18 | BTR WG | Ulmo | Pass | | ||||||||||||||
| +--------------+-------------------------------+----------------+--------------------------------+ | ||||||||||||||
|
|
||||||||||||||
sarina marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||

Uh oh!
There was an error while loading. Please reload this page.