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

enrol records not created for courses in 2.x on restore from 1.9 backups

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1, 2.3.4
    • Fix Version/s: 2.4.5, 2.5.1, 2.6
    • Component/s: Backup, Web Services
    • Labels:
    • Environment:
      GNU/Linux Fedora 14 64-bit
    • Database:
      MySQL
    • Testing Instructions:
      Hide

      1/ create 1.9 backup of course
      2/ create >=2.4 backup of course with non-default enrol methods and some users (for example enable guest access and set some password)
      3/ try restoring the 1.9 course into new course - it should have default enrol methods and no users
      4/ try merging the 1.9 course into existing course - the enrolments should not change
      5/ try restoring of 2.x course into new course with users - it should keep previous state
      6/ try restoring of 2.x course into new course without users - there should be default methods
      7/ try merging of 2.x course into existing course without users - nothing should change
      8/ verify "Restore as manual enrolments" restore option is always disabled when user data not present in backup (includes backup from 1.9)

      Show
      1/ create 1.9 backup of course 2/ create >=2.4 backup of course with non-default enrol methods and some users (for example enable guest access and set some password) 3/ try restoring the 1.9 course into new course - it should have default enrol methods and no users 4/ try merging the 1.9 course into existing course - the enrolments should not change 5/ try restoring of 2.x course into new course with users - it should keep previous state 6/ try restoring of 2.x course into new course without users - there should be default methods 7/ try merging of 2.x course into existing course without users - nothing should change 8/ verify "Restore as manual enrolments" restore option is always disabled when user data not present in backup (includes backup from 1.9)
    • Workaround:
      Hide

      Creating a new course will create the appropriate enrol records, so you can edit the courseid value and the manual enrollment resumes working (or gets past that error, anyway).

      Show
      Creating a new course will create the appropriate enrol records, so you can edit the courseid value and the manual enrollment resumes working (or gets past that error, anyway).
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      w24_MDL-28394_m26_enrolrestore

      Description

      In order for web services to work with the manual_enrollment authorization plugin, the appropriate enrol records for the courses one is enrolling users into must exist. When courses are restored from backups made from Moodle 1.9, these enrol records do not exist, and so web service-based manual enrollments cannot occur.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              skodak Petr Skoda
              Reporter:
              bazzymg Basil Gohar
              Integrator:
              Dan Poltawski
              Tester:
              Rajesh Taneja
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Juan Leyva, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona)
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                8/Jul/13