Merge branch 'MDL-25808' of git://git.luns.net.uk/moodle
authorPetr Skoda <commits@skodak.org>
Mon, 3 Jan 2011 16:59:53 +0000 (17:59 +0100)
committerPetr Skoda <commits@skodak.org>
Mon, 3 Jan 2011 16:59:53 +0000 (17:59 +0100)
enrol/meta/locallib.php

index f626504..066390f 100644 (file)
@@ -180,7 +180,7 @@ class enrol_meta_handler {
         $plugin = enrol_get_plugin('meta');
         foreach ($enrols as $enrol) {
             //unenrol all users
-            $ues = $DB->get_records_sql('user_enrolments', array('courseid'=>$enrol->courseid, 'enrolid'=>$enrol->id));
+            $ues = $DB->get_recordset('user_enrolments', array('enrolid'=>$enrol->id));
             foreach ($ues as $ue) {
                 $plugin->unenrol_user($enrol, $ue->userid);
             }