mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
Applying new rs_xxx() functions everywhere. MDL-8134
Merged from MOODLE_17_STABLE
This commit is contained in:
parent
931b508559
commit
7cd5208507
@ -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)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user