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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.3, 2.1
    • Fix Version/s: 2.0.4, 2.1.1, 2.2
    • Component/s: Enrolments
    • Labels:
    • Testing Instructions:
      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
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      w28_MDL-28313_m22_enroldb

      Description

      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.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  1/Aug/11