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

Enrolment using remote database does not work if remote database fields are not in upper case

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • None
    • 1.9
    • Enrolments
    • None
    • Database for Moodle itself - MySQL,
      Remote database for enrolments Oracle10, using enrol_dbtype - oci8po (set on administration page Courses->Enrolments->External Database (edit) )
    • MOODLE_19_STABLE

    Description

      We are using external database (Oracle) for enrolments. When launcing enrol/database/enrol_database_sync.php (from command line), few error messages appeared that object does not contain specified fields.
      Example -
      "PHP Notice: Undefined property: stdClass::$kkods in /home/moodle/moodle/enrol/database/enrol.php on line 260"
      "PHP Notice: Undefined property: stdClass::$login in /home/moodle/moodle/enrol/database/enrol.php on line 317"

      We have added functionality to script enrol/database/enrol.php. Lines of code in original Moodle v1.9 enrol/database/enrol.php are 225, 282 respectively.
      $extcourse = $extcourse_obj->{$CFG->enrol_remotecoursefield}; - #225
      array_push($extenrolments, $crs_obj->{$CFG->enrol_remoteuserfield}); - #282

      These errors disappeared and script worked fine when on enrollments administration page Courses->Enrolments->External Database (edit) (admin/enrol_config.php?enrol=database) remote database fields "enrol_remotecoursefield" and "enrol_remoteuserfield" were saved in upper case.

      There was no need to save remote database fields in v1.8 in uppercase. Possibly it this bug deals with new version of adodb database drivers in Moodle v1.9 comparing with drivers used in Moodle v1.8.

      Attachments

        Issue Links

          Activity

            People

              stronk7 Eloy Lafuente (stronk7)
              juris Juris Treibahs
              Nobody Nobody
              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.