Permalink
Browse files

enrol/meta MDL-25808 - error when deleting metacourse

Using incorrect dmllib function & testing on non-existant courseid column
  • Loading branch information...
danpoltawski committed Dec 30, 2010
1 parent c63ebd4 commit 85fd37d39679fcee2b78cc1871b4e80df0473845
Showing with 1 addition and 1 deletion.
  1. +1 −1 enrol/meta/locallib.php
View
@@ -180,7 +180,7 @@ public function course_deleted($course) {
$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);
}

0 comments on commit 85fd37d

Please sign in to comment.