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

Database enrolment remote role field not being set during upgrade from 1.9 -> 2

XMLWordPrintable

    • MOODLE_20_STABLE, MOODLE_21_STABLE
    • MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • w28_MDL-28313_m22_enroldb
    • Hide

      1/ install Moodle 1.9 and configure database enrolment
      2/ upgrade
      3/ verify the settings are the same - concentrate on the two role options

      Show
      1/ install Moodle 1.9 and configure database enrolment 2/ upgrade 3/ verify the settings are the same - concentrate on the two role options

      I've been testing migrations of our Moodle installation and I've noticed each time that the role field for database enrolments (enrol_db_remoterolefield) isn't being mapped into the correct value upon upgrade (enrol_database | remoterolefield). I believe (but have not tested) that this is because:

      /enrol/database/db/install.php:77

      if (isset($CFG->enrol_remoterolefield)) {
          set_config('remoterolefield', $CFG->enrol_remoterolefield, 'enrol_database');
          unset_config('enrol_remoterolefield');
      }

      should be using $CFG->enrol_db_remoterolefield instead. I am using the most up-to-date version of the MOODLE_21_STABLE branch available on github. Please forgive me if this report is in error

      Replication instructions:

      • Upgrade a Moodle 1.9 installation using database enrolments with roles defined to Moodle 2.0
      • The remoterolefield is empty after upgrade.

            skodak Petr Skoda
            dcc Robert Usher
            Sam Hemelryk Sam Hemelryk
            David Mudrák (@mudrd8mz) David Mudrák (@mudrd8mz)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

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