Commit graph

15 commits

Author SHA1 Message Date
Arnaud Trouvé
d37cc22135 Add userfullname variable for email subject (#316) 2020-04-17 16:26:32 +02:00
mwithheld
db81b49608 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.
2020-04-01 15:11:33 +02:00
Mark Nelson
fc0fb240fd Always send emails from 'noreplyuser' (#165) 2019-05-28 14:35:41 +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