Fix for bug 4031 -- stupid mistake of using get_record_select() when I mean get_record() - see the bug entry for more details

This commit is contained in:
martinlanghoff
2005-09-07 22:48:48 +00:00
parent 4e9cc4842f
commit fce45181d7
+1 -1
View File
@@ -71,7 +71,7 @@ function get_student_courses(&$user) {
foreach ($user->student as $courseid => $value) {
// unenrol only if it's a record pulled from external db
if (get_record_select('user_students', 'userid', $user->id, 'courseid', $courseid, 'enrol', 'database')) {
if (get_record('user_students', 'userid', $user->id, 'courseid', $courseid, 'enrol', 'database')) {
unenrol_student($user->id, $courseid); /// Unenrol the student
unset($user->student[$course->id]); /// Remove from old list
} else {