AnubisLMS / AnubisLMS/Anubis

Forum email notifications

Aperta
#462 0 commenti 0 reazioni 1 assegnatario Rivendicata da @wabscale Vedi su GitHub
backend
Lingua principale
Python
Stelle
381
Fork
53
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.