mdjnelson / moodle-mod_customcert

Enables the creation of dynamically generated certificates with complete customisation via the web browser.
https://moodle.org/plugins/mod_customcert
GNU General Public License v3.0
90 stars 158 forks source link

Bug : Wrongly automatic email send for a user has role Teacher+Student #508

Open ho30hero opened 2 years ago

ho30hero commented 2 years ago

Hello and hope you are well.

For some reason, our educational department sometimes set a student role for some teachers in a course at the same time. Email sent for this user even if we don't set Quiz score.

The situation is like this: Send student: On if user role: Teacher && Student Restriction: a Quiz number more than 50% for example. Moodle 10 + Latest plugin for moodle 10 from github

The problem: Certificate Email send for that user (teacher) even if we don't set a score for the related Quiz.

The expected result: Email doesn't send for users with two roles (Teacher + Student).

Kind Regards

mdjnelson commented 5 months ago

It's because the plugin just checks if the user can view the certificate if they were to visit the course in a browser. As a teacher they can because if they visit the course they can view it regardless of the restriction settings. Are you able to confirm whether the teacher can get the certificate if they visit the course themselves?