AnubisLMS / AnubisLMS/Anubis

Forum email notifications

Open
#462 0 comments 0 reactions 1 assignee Claimed by @wabscale View on GitHub
backend
Dominant language
Python
Stars
381
Forks
53
PR merge metrics
No merged PRs in 30d

Description

Here is the most delicate part of the whole thing. Email notifications are a dangerous thing. If you make a small mistake you can accidentially send emails off to hundreds of people if you are not careful. No pressure lol

We will need to have a few boolean values added to the user table for things like:

- is_new_post_notification_enabled # For each new post
- is_comment_notification_enabled # For followup comments
- is_instructor_post_notification_enabled # For when a TA/Professor posts

We can then send emails in RPC jobs. Nothing fancy needed, we already have the logic for sending emails. We will need email templates written for the different types of events too. We can follow the existing models:

This is the Subject and Body for the assignment release email for reference:

```jinja2
Anubis LMS :: {{ assignment.name }} has been released
```

```jinja2


Hello {{ user.netid }},


An assignment has been released on

Anubis.


Course: {{ course.name }}

Assignment: {{ assignment.name }}

Due Date: {{ assignment.due_date }}


To stop reciving emails from anubis, edit your
notification preferences on your profile page:

https://anubis-lms.io/profile


- Anubis LMS Robot

Made for students, by students.


```

And where we actually send the emails: https://github.com/AnubisLMS/Anubis/blob/7ed1c74a662dda254182045c84f2bd2a3b368160/api/anubis/jobs/email_notifications.py#L73

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.