isuru89 / moodle-local_reminders

A Moodle local plugin for automating email reminders for calendar events
https://moodle.org/plugins/local_reminders
28 stars 31 forks source link

Duplicate reminder emails when a user has two or more roles in a course #149

Closed isuru89 closed 2 years ago

isuru89 commented 2 years ago

Describe the bug (required) There are duplicate reminder emails being sent when a particular user has been assigned to two or more roles (such as, student, teacher, etc).

To Reproduce (required) Steps to reproduce the behavior:

  1. Create a user and a course
  2. Enrol user to the above course with both Student and Teacher roles.
  3. Create an assignment event with a due date.
  4. Run local reminders scheduled task
  5. The above user will receive duplicate reminder emails. One for role student and other is for teacher.

Expected behavior (required) Only one reminder email should be sent for a user for a single event.

Cron Logs (required) Not required.

Environment (required):