MDL-62167 core_badges: Remove usage of a reserved keyword of Oracle
authorFrédéric Massart <fred@branchup.tech>
Tue, 1 May 2018 12:02:09 +0000 (20:02 +0800)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Tue, 1 May 2018 13:21:46 +0000 (15:21 +0200)
badges/classes/privacy/provider.php

index 376ba42..1b198cb 100644 (file)
@@ -299,10 +299,10 @@ class provider implements
         if (in_array($userid, $contexts[CONTEXT_USER])) {
 
             // Export the badges.
-            $uid = $DB->sql_concat_join("'-'", ['b.id', 'COALESCE(bc.id, 0)', 'COALESCE(bi.id, 0)',
+            $uniqueid = $DB->sql_concat_join("'-'", ['b.id', 'COALESCE(bc.id, 0)', 'COALESCE(bi.id, 0)',
                 'COALESCE(bma.id, 0)', 'COALESCE(bcm.id, 0)']);
             $sql = "
-                SELECT $uid AS uid, b.id,
+                SELECT $uniqueid AS uniqueid, b.id,
                        bi.id AS biid, bi.dateissued, bi.dateexpire, bi.uniquehash,
                        bma.id AS bmaid, bma.datemet, bma.issuerid,
                        bcm.id AS bcmid,