WikiEducationFoundation / WikiEduDashboard

Wiki Education Foundation's Wikipedia course dashboard system
https://dashboard.wikiedu.org
MIT License
387 stars 617 forks source link

Improve BlockedUserAlert emails #5776

Open ragesoss opened 5 months ago

ragesoss commented 5 months ago

Current Behavior:

Wiki Education staff get alerts when a student's account gets blocked.

Desired Behavior:

If the block happens while the student is enrolled in a still-ongoing course, the student and instructor(s) should be emailed as well, with a full explanatory message in the email.

cyrillefr commented 5 months ago

Hello @ragesoss ,

May I work on this issue ?

ragesoss commented 5 months ago

Sure!

On Wed, Apr 17, 2024, 7:48 AM cyrillefr @.***> wrote:

Hello @ragesoss https://github.com/ragesoss ,

May I work on this issue ?

— Reply to this email directly, view it on GitHub https://github.com/WikiEducationFoundation/WikiEduDashboard/issues/5776#issuecomment-2061441449, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGPEY7MD3OTBB2ZZI4H7VTY52DVHAVCNFSM6AAAAABGIC6VE6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRRGQ2DCNBUHE . You are receiving this because you were mentioned.Message ID: @.*** com>

cyrillefr commented 5 months ago

Hello @ragesoss , I need clarification(s) :)

Currently, when creating a new Alert, there is only one course associated. So, there is a mail sent to the content_expert of the last course of the student. (the one(s) who are greater).

But to be blocked is not associated with one particular course though I understand the mail sent to the last course content expert -> someone will get notice of the blocking.

So now, my guess is there should be the same number of Alerts that the number of ongoing courses the student is following. (3 ongoing courses -> 3 Alerts -> mail to 3 groups of instructors).

Also, should I then keep the mail to the content expert of the last course ? (def email_content_expert in app/modales/alert.rb. Are the 'greeter' the Wiki Education staff you are referring to ?

Do the mail sent to the student should be simple like 'You have been blocked in Wikipedia' or be implemented as an AlertMail or a regular mail ?

ragesoss commented 5 months ago

I think keeping the current BlockedUserMonitor logic basically unchanged is fine. There might be a few rare cases where a student is in more than one current course, in which case the instructors for any courses except the latest one would not get an email, but I think that's okay. In practice, that will almost never happen.

Yes, the 'greeter' is the Wiki Education staff I was referring to.

If you implement an email with a simple message (but using the styling of the other emails that go to non-admins, like basically any email besides the AlertMailer one), I can expand it with additional text.