简体   繁体   中英

Moodle email to users with expired certificate

I'm looking for a way to send emails to users which certificate expired (or to users which passed quiz some time ago). The best way that will fit me is to not involve in certificate/quiz module files. I think that cron is going to be the best solution, but have no idea about setting up cron jobs.

Which version of Moodle are you using? Cron is the old way, from Moodle 2.7+ you should use scheduled tasks.

In summary, create a local plugin

https://docs.moodle.org/dev/Local_plugins

Then add a scheduled task to get all certificates past the expiry date

https://docs.moodle.org/dev/Task_API

Then use messaging to send an email - take a look at this answer (ignore the event code)

Email using cron and including attachment to email from moodle

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM