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

Restoring course with non-default enrollment methods does not restore those enrollment methods if users aren't also restored

XMLWordPrintable

    • MOODLE_24_STABLE, MOODLE_27_STABLE, MOODLE_28_STABLE, MOODLE_32_STABLE
    • MOODLE_33_STABLE
    • wip-MDL-40838-master-2
    • Hide
      1. Create a course with non default enrolment methods with some enrolled users (do not use cohorts because it automatically enrols same users even if they were not in the backup and it will be confusing during the test)
      2. Make two backups - with and without user information
      3. Restore the backups and make sure you have an option of restoring enrollment methods. Try all combinations
        • users&enrollments
        • users without enrollments (should be restored as manual)
        • without users but with enrollments (this is the requested use case)
        • without users and without enrollments
      4. Try restoring the backups into another course with deleting or merging, it should work too.
      5. Remove from manager role capability moodle/course:enrolconfig, login as manager and try restoring the same backup: you should see that enrolment methods are locked by permission, make sure they will not be restored

      Please note that enrollment methods are always included in the backup and there is no option not to include them. This also means that backups without user information that were made before this patch can also be restored with enrollment methods after the patch

      Show
      Create a course with non default enrolment methods with some enrolled users (do not use cohorts because it automatically enrols same users even if they were not in the backup and it will be confusing during the test) Make two backups - with and without user information Restore the backups and make sure you have an option of restoring enrollment methods. Try all combinations users&enrollments users without enrollments (should be restored as manual) without users but with enrollments (this is the requested use case) without users and without enrollments Try restoring the backups into another course with deleting or merging, it should work too. Remove from manager role capability moodle/course:enrolconfig, login as manager and try restoring the same backup: you should see that enrolment methods are locked by permission, make sure they will not be restored Please note that enrollment methods are always included in the backup and there is no option not to include them. This also means that backups without user information that were made before this patch can also be restored with enrollment methods after the patch
    • 3.3 sprint 3

      If you have a course with non-default enrollment methods (methods other than manual, self, and guest), upon restoring a backup of that course without users, the restored course only contains the default methods. If you restore the course with users then (some of?) the correct methods are restored with the course.

      Steps to reproduce:

      1. Create a course and edit the enrollment methods. Remove the default methods (manual, self, and guest). Add non-default methods such as Cohort Sync and Flat File.
      2. Make a backup of this course including user data.
      3. Restore the backup without user data.
      4. In the restored course, go to the enrollment methods and note that the default methods (manual, self, and guest) were added but Cohort and Flat File were not. This is not what users expect; they expect to have Cohort and Flat File.
      5. Restore the backup to a new course, this time with user data.
      6. In the second restored course, go to the enrollment methods and note that the Cohort method was added to the course (this is expected) and the default methods were not added (this is also expected). Flat file is expected to be there but for some reason it isn't.

      This problem just started happening after we applied the fix from this issue: MDL-28394

      Prior to that fix, repeating the same steps above would result in #4 and #6 both having the enrollment methods from the backup restored in the course and in neither case were the default methods added.

      I understand why the fix in MDL-28394 was made but it seems to need a further tweak so that the enrollment methods existing in the backup are restored even if users are not. Admins and instructors expect the non-default methods to be restored without users the same way they are if users are restored.

        1. after.png
          after.png
          19 kB
        2. before.png
          before.png
          18 kB
        3. dropdown.png
          dropdown.png
          29 kB

            marina Marina Glancy
            cfollin Chris Follin
            Jake Dallimore Jake Dallimore
            David Monllaó David Monllaó
            Rajesh Taneja Rajesh Taneja
            Votes:
            5 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

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