Moodle
  1. Moodle
  2. MDL-29618

Enrol methods and enrolments not being restored anymore

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0.4, 2.1.1, 2.2
    • Fix Version/s: 2.0.5, 2.1.2
    • Component/s: Backup, Enrolments
    • Labels:
    • Testing Instructions:
      Hide

      This required own testing + repeat the testing performed @ MDL-26841 (because of being a regression).

      A) Own testing:

      • Create one course, enable manual enrolments and enrol 1 teacher and 2 students.
      • As admin (that have perms to backup users and enrolments) perform one course backup.
      • As admin, restore that backup file into new course.
      • TEST: The manual enrolment method is enabled in the restored course and the 1 teacher and 2 students are enrolled as they where in the source course.

      B) Original testing:

      • Create 2 courses: "source" and "target"
      • In "source" add various enrolment plugins (manual, guest, self...) and add 1-2 manual enrolments (students). Add also 1 forum and ignite some discussions with those students.
      • In "target" add manual enrolment only with 1 student (different student from the ones in point 2).
      • Logged as admin, perform one import in "target", picking "source" as origin. Select the forum activity and import.
      • TEST: The operations ends without error.
      • TEST: The forum activity has been imported but without any discussion.
      • TEST: Look at "target" enrolment methods. Only the original "manual" is there and none of the enrolment methods in "source" have been imported.
      Show
      This required own testing + repeat the testing performed @ MDL-26841 (because of being a regression). A) Own testing: Create one course, enable manual enrolments and enrol 1 teacher and 2 students. As admin (that have perms to backup users and enrolments) perform one course backup. As admin, restore that backup file into new course. TEST: The manual enrolment method is enabled in the restored course and the 1 teacher and 2 students are enrolled as they where in the source course. B) Original testing: Create 2 courses: "source" and "target" In "source" add various enrolment plugins (manual, guest, self...) and add 1-2 manual enrolments (students). Add also 1 forum and ignite some discussions with those students. In "target" add manual enrolment only with 1 student (different student from the ones in point 2). Logged as admin, perform one import in "target", picking "source" as origin. Select the forum activity and import. TEST: The operations ends without error. TEST: The forum activity has been imported but without any discussion. TEST: Look at "target" enrolment methods. Only the original "manual" is there and none of the enrolment methods in "source" have been imported.
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE
    • Pull from Repository:
    • Pull Master Branch:
    • Rank:
      19479

      Description

      This is one nasty regression introduced by myself @ MDL-26841 resulting on enrol methods and associated enrolments not being restored any more due to one stupidly bad written condition.

      My fault, apologises!

        Issue Links

          Activity

          Hide
          Eloy Lafuente (stronk7) added a comment -

          Sending to integration...

          Show
          Eloy Lafuente (stronk7) added a comment - Sending to integration...
          Hide
          Sam Hemelryk added a comment -

          Thanks Eloy

          Show
          Sam Hemelryk added a comment - Thanks Eloy
          Hide
          Rajesh Taneja added a comment -

          I think this has caused one more issue which needs to be fixed MDL-29466

          Show
          Rajesh Taneja added a comment - I think this has caused one more issue which needs to be fixed MDL-29466
          Hide
          Rajesh Taneja added a comment -

          Sorry guys, can't reproduce this issue again. Seems like there is something with session or cache... Will ask user to update and see if MDL-29466 is still a issue

          Show
          Rajesh Taneja added a comment - Sorry guys, can't reproduce this issue again. Seems like there is something with session or cache... Will ask user to update and see if MDL-29466 is still a issue
          Hide
          Rajesh Taneja added a comment -

          Works Great...
          Both test pass without any problem
          Thanks for fixing this Eloy.

          Show
          Rajesh Taneja added a comment - Works Great... Both test pass without any problem Thanks for fixing this Eloy.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          git repositories have been updated with your awesome changes, thanks! Closing.

          Show
          Eloy Lafuente (stronk7) added a comment - git repositories have been updated with your awesome changes, thanks! Closing.

            People

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

              Dates

              • Created:
                Updated:
                Resolved: