Merge branch 'wip-mdl-41339' of https://github.com/jennymgray/moodle
authorDamyon Wiese <damyon@moodle.com>
Wed, 23 Oct 2013 03:50:50 +0000 (11:50 +0800)
committerDamyon Wiese <damyon@moodle.com>
Wed, 23 Oct 2013 03:50:50 +0000 (11:50 +0800)
tag/lib.php

index b6d3203..df70341 100644 (file)
@@ -324,7 +324,7 @@ function tag_get_tags($record_type, $record_id, $type=null, $userid=0) {
         $params['userid'] = $userid;
     }
 
-    $sql = "SELECT tg.id, tg.tagtype, tg.name, tg.rawname, tg.flag, ti.ordering
+    $sql = "SELECT ti.id as taginstanceid, tg.id, tg.tagtype, tg.name, tg.rawname, tg.flag, ti.ordering
               FROM {tag_instance} ti
               JOIN {tag} tg ON tg.id = ti.tagid
               WHERE ti.itemtype = :recordtype AND ti.itemid = :recordid $u $sql_type