Commit graph

21 commits

Author SHA1 Message Date
Mark Nelson
c3942c3b75 Do not encode html entities in emails (#457) 2021-09-28 22:24:52 +08:00
Mark Nelson
c3a9172d8d Use 'cron_setup_user' when sending emails (#414) 2021-06-13 14:06:30 +08:00
Mark Nelson
8a80ab82d8 Set proper context when sending emails (#402) 2021-06-13 13:38:41 +08:00
Mark Nelson
c1615cbd16 Do not email out certificates with no elements (#276) 2020-11-26 19:54:58 +08:00
Mark Nelson
46ca744d32 Do not email those who can manage the certificate (#376) 2020-09-20 14:24:50 +02:00
mwithheld
a5eea57644 Do not fail if multiple certificate issues (#295)
Ignore multiple matches for a user-customcert combo in the customcert_issues table.
In our case, the scheduled task died when:
$issueid = $DB->get_field('customcert_issues', 'id', array('userid' => $enroluser->id, 'customcertid' => $customcert->id));
returned 2 rows, which shouldn't happen, but did anyway.

This means in rare circumstances (i.e. the race condition) the user may get multiple certificates (e.g. one via the UI, one by email) but that is better than not getting one at all and the whole job dying.
2019-12-16 15:55:42 +01:00
Arnaud Trouvé
080e53d13a Add userfullname variable for email subject (#316) 2019-12-14 14:17:49 +01:00
Mark Nelson
8358280c6c Added capability to determine who can receive a certificate (#270) 2019-05-28 17:52:52 +08:00
Mark Nelson
1746ec47dc Always send emails from 'noreplyuser' (#165) 2019-04-16 19:37:07 +08:00
mwithheld
97e44d3d1d Move creating the temp directory out of the emailing for loop (#238) 2018-12-17 15:23:50 +08:00
Mark Nelson
9834d7f4b8 Removed boolean return and added a comment (#237) 2018-12-17 14:13:15 +08:00
mwithheld
255743f9e0 Reduce code nesting level in task (#237)
Make the code easier to read and understand
2018-12-17 14:10:30 +08:00
Tristan Mackay
9f2a36d983 #176 Only get users details who are enrolled within the course 2018-07-13 14:46:38 +08:00
Mark Nelson
91da92f10d #187 Fix broken SQL on Oracle 2018-07-12 15:16:24 +08:00
Mark Nelson
3c6a8b97f3 Added helper function to issue certificates 2018-05-26 18:22:27 +08:00
Eugene Venter
78931854ee #173 Fix race condition on certificate issues in scheduled task 2018-05-14 19:30:28 +08:00
Mark Nelson
759df979c8 #126 Use the course full name in emails 2017-11-11 15:30:19 +08:00
Mark Nelson
3c937be003 #111 Fixed task creating duplicate rows in issue table 2017-05-21 10:59:38 +08:00
Mark Nelson
7d2664991f #48 Make required time check more robust 2017-04-27 15:18:11 +08:00
Mark Nelson
4f4be1f918 Fixed local_codechecker complaint 2017-04-26 22:07:40 +08:00
Mark Nelson
72c3b278e3 #48 Added task and settings responsible for emailing certificates 2017-04-26 21:44:33 +08:00