-
Bug
-
Resolution: Fixed
-
Critical
-
2.0
-
None
-
LAMP - external database oracle
-
MOODLE_20_STABLE
-
MOODLE_20_STABLE
follow the moodle docs in order to run an enrolment sync: http://docs.moodle.org/en/External_database
When you run it, there is a loop.
The error is :
Notice: Undefined property: stdClass::$extuser in /home/jerome/Projects/Moodle_HEAD/moodle/enrol/database/enrol.php on line 282
Call Stack:
0.0014 125416 1.
() /home/jerome/Projects/Moodle_HEAD/moodle/enrol/database/enrol_database_sync.php:0
0.3043 21667088 2. enrolment_plugin_database->sync_enrolments() /home/jerome/Projects/Moodle_HEAD/moodle/enrol/database/enrol_database_sync.php:34
>>>>> extuser is the fieldname of userid in my external database
I added a print_r():
280. while ($crs_obj = (object)$crs->FetchRow()) {
281. $crs_obj = (object)array_change_key_case((array)$crs_obj , CASE_LOWER);
282. print_r($crs_obj);
283. array_push($extenrolments, $crs_obj->{$CFG->enrol_remoteuserfield});
284. }
I obtained this display:
stdClass Object
(
[extuser] => 3
)
stdClass Object
(
[extuser] => 4
)
stdClass Object
(
[scalar] =>
)
I guess the scalar attribut cause problem (I didn't look further)
- has a non-specific relationship to
-
MDL-16043 Enrolment sync need to be cross-db
- Closed