From 7cd5208507b75a5d9d4d9bcc3682f65ed0e57ba2 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Mon, 29 Jan 2007 23:56:55 +0000 Subject: [PATCH] Applying new rs_xxx() functions everywhere. MDL-8134 Merged from MOODLE_17_STABLE --- enrol/database/enrol.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/enrol/database/enrol.php b/enrol/database/enrol.php index b47d19b728..3d99bc3ed8 100644 --- a/enrol/database/enrol.php +++ b/enrol/database/enrol.php @@ -83,11 +83,10 @@ function setup_enrolments(&$user) { if ($rs->RecordCount() > 0) { // We found some courses $courselist = array(); - while (!$rs->EOF) { // Make a nice little array of courses to process - $courselist[] = $rs->fields['enrolremotecoursefield']; - $rs->MoveNext(); + while ($fields_obj = rs_fetch_next_record($rs)) { // Make a nice little array of courses to process + $courselist[] = $fields_obj->enrolremotecoursefield; } - $rs->Close(); + rs_close($rs); foreach ($courselist as $coursefield) { /// Check the list of courses against existing if ($course = get_record('course', $CFG->enrol_localcoursefield, $coursefield)) { -- 2.39.5