Skip to content

Commit 30fbe2a

Browse files
committed
Some minor changes to the email certificate task (#531)
1 parent 34b8547 commit 30fbe2a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

classes/task/email_certificate_task.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,17 +61,17 @@ public function execute() {
6161
// Get all the certificates that have requested someone get emailed.
6262
$emailotherslengthsql = $DB->sql_length('c.emailothers');
6363
$sql = "SELECT c.*, ct.id as templateid, ct.name as templatename, ct.contextid, co.id as courseid,
64-
co.fullname as coursefullname, co.shortname as courseshortname
65-
FROM {customcert} c
66-
JOIN {customcert_templates} ct
64+
co.fullname as coursefullname, co.shortname as courseshortname
65+
FROM {customcert} c
66+
JOIN {customcert_templates} ct
6767
ON c.templateid = ct.id
68-
JOIN {course} co
68+
JOIN {course} co
6969
ON c.course = co.id";
7070

7171
// Add JOIN with mdl_course_categories to exclude certificates from hidden courses.
7272
$sql .= " JOIN {course_categories} cat ON co.category = cat.id";
7373

74-
// Add conditions to exclude certificates from hidden courses.
74+
// Only get certificates where we have to email someone.
7575
$sql .= " WHERE (c.emailstudents = :emailstudents
7676
OR c.emailteachers = :emailteachers
7777
OR $emailotherslengthsql >= 3)";

0 commit comments

Comments
 (0)