Skip to content

Commit 4425055

Browse files
committed
Fixed SQL error in Oracle (#646)
Also removed confusing comment.
1 parent 7431bd6 commit 4425055

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

classes/task/issue_certificates_task.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,9 @@ public function execute() {
5555

5656
// We are going to issue certificates that have requested someone get emailed.
5757
$emailotherslengthsql = $DB->sql_length('c.emailothers');
58-
$sql = "SELECT c.*, ct.id as templateid, ct.name as templatename, ct.contextid, co.id as courseid,
59-
co.fullname as coursefullname, co.shortname as courseshortname
58+
$sql = "SELECT c.id, c.templateid, c.course, c.requiredtime, c.emailstudents, c.emailteachers, c.emailothers,
59+
ct.id AS templateid, ct.name AS templatename, ct.contextid, co.id AS courseid,
60+
co.fullname AS coursefullname, co.shortname AS courseshortname
6061
FROM {customcert} c
6162
JOIN {customcert_templates} ct
6263
ON c.templateid = ct.id
@@ -67,7 +68,6 @@ public function execute() {
6768
LEFT JOIN {customcert_issues} ci
6869
ON c.id = ci.customcertid";
6970

70-
// Add conditions to exclude certificates from hidden courses.
7171
$sql .= " WHERE (c.emailstudents = :emailstudents
7272
OR c.emailteachers = :emailteachers
7373
OR $emailotherslengthsql >= 3)";

0 commit comments

Comments
 (0)