Merge branch 'master_MDL-28962' of git://github.com/danmarsden/moodle
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Tue, 23 Aug 2011 16:31:01 +0000 (18:31 +0200)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Tue, 23 Aug 2011 16:31:01 +0000 (18:31 +0200)
enrol/imsenterprise/lib.php

index 5a6c098..4b4dc23 100644 (file)
@@ -645,7 +645,7 @@ function process_membership_tag($tagcontents){
                         if(isset($groupids[$member->groupname])) {
                             $member->groupid = $groupids[$member->groupname]; // Recall the group ID from cache if available
                         } else {
-                            if($groupid = $DB->get_field('groups', 'id', 'name', $member->groupname, array('courseid'=>$ship->courseid))){
+                            if($groupid = $DB->get_field('groups', 'id', array('courseid'=>$ship->courseid, 'name'=>$member->groupname))){ 
                                 $member->groupid = $groupid;
                                 $groupids[$member->groupname] = $groupid; // Store ID in cache
                             } else {