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

Typo in setting in backup_cron_helper.class.php

    Details

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

      1. Navigate to Admin > Courses > Backups > Automated backup setup
      2. Configure the backup to in the near future
      3. Select 'users' to include users in the backup
      4. Unselect the 'include role assignments button'
      5. Force cron to run and ensure an automated backup has been completed
      6. Go to a course and attempt to restore a backup

      Expected result:
      -------------------------
      The users are included in the backup, and the role assignments are not

      Actual result:
      ------------------
      The users are included in the backup with the role assignments. The users
      setting is what is actually used to determine whether role assignments get
      backed up

      Show
      1. Navigate to Admin > Courses > Backups > Automated backup setup 2. Configure the backup to in the near future 3. Select 'users' to include users in the backup 4. Unselect the 'include role assignments button' 5. Force cron to run and ensure an automated backup has been completed 6. Go to a course and attempt to restore a backup Expected result: ------------------------- The users are included in the backup, and the role assignments are not Actual result: ------------------ The users are included in the backup with the role assignments. The users setting is what is actually used to determine whether role assignments get backed up
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE
    • Pull from Repository:

      Description

      In the backup/util/helper/backup_cron_helper.class.php file at around line 312, this is written:

      'users' => 'backup_auto_users',
      'role_assignments' => 'backup_auto_users',
      'user_files' => 'backup_auto_user_files',

      The 'role_assignments' key should probably have the value 'backup_auto_role_assignments'.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            n0nick Sagie Maoz added a comment -

            Attaching patch (trivial change).

            Show
            n0nick Sagie Maoz added a comment - Attaching patch (trivial change).
            Hide
            poltawski Dan Poltawski added a comment -

            UPDATE m21_backup_courses set nextstarttime =0; is helpful for testing this issue

            Show
            poltawski Dan Poltawski added a comment - UPDATE m21_backup_courses set nextstarttime =0; is helpful for testing this issue
            Hide
            poltawski Dan Poltawski added a comment -

            Thanks for reporting this - i've tested and verified this issue.

            Integrators: this patch can be cherry picked onto 20_STABLE and master.

            Show
            poltawski Dan Poltawski added a comment - Thanks for reporting this - i've tested and verified this issue. Integrators: this patch can be cherry picked onto 20_STABLE and master.
            Hide
            samhemelryk Sam Hemelryk added a comment -

            Thanks guys, I've cherry-picked this only 20, 21, and master as there was a typo in the commit message with the MDL bug number.

            Cheers
            Sam

            Show
            samhemelryk Sam Hemelryk added a comment - Thanks guys, I've cherry-picked this only 20, 21, and master as there was a typo in the commit message with the MDL bug number. Cheers Sam
            Hide
            nebgor Aparup Banerjee added a comment -

            yup this worked for me. course context role assignments were not restored (or even backed up). works for me!

            ps: context level role assignments obviously showed up but that shouldn't be related to the backup.

            Show
            nebgor Aparup Banerjee added a comment - yup this worked for me. course context role assignments were not restored (or even backed up). works for me! ps: context level role assignments obviously showed up but that shouldn't be related to the backup.
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Sent upstream and closing, many thanks!

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Sent upstream and closing, many thanks!

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  10/Oct/11