AnubisLMS / AnubisLMS/Anubis

Forum email notifications

Offen
#462 0 Kommentare 0 Reaktionen 1 zugewiesene Person Beansprucht von @wabscale Auf GitHub ansehen
backend
Vorherrschende Sprache
Python
Sterne
381
Forks
53
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.