Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-16045

Enrolment sync doesn't work

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 2.0
    • 2.0
    • Enrolments
    • None
    • LAMP - external database oracle
    • MOODLE_20_STABLE
    • MOODLE_20_STABLE

    Description

      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.

      {main}

      () /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)

      Attachments

        Issue Links

          Activity

            People

              skodak Petr Skoda (Inactive)
              jerome Jérôme Mouneyrac
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Clockify

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.