Skip to content

Commit

Permalink
Applying new rs_xxx() functions everywhere. MDL-8134
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed Jan 29, 2007
1 parent bfc8a71 commit 5fb8a65
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions enrol/database/enrol.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 5fb8a65

Please sign in to comment.