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

backup_general_users forbids all users to backup user data

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0.3, 2.3.1, 2.4, 2.5.3, 2.6.3, 2.7, 2.9.2, 3.0.1, 3.1, 3.2, 3.2.1, 3.2.2, 3.3, 3.4
    • Fix Version/s: 3.3.4, 3.4.1
    • Component/s: Backup
    • Database:
      Any
    • Testing Instructions:
      Hide
      1. Create a course with a data activity and add some user data to it. (See behat test for example)
      2. Set the administration settings backup_general_users and restore_general_users to false.
      3. Start the backup of the created course.
      4. Assert on "Initial"-stage the "Include users" setting to be false.
      5. Move on to "Schema"-stage.
      6. Assert user data field for section and data activity to be false and rendered as a red x.
      7. Go back to the "Initial"-stage, set "Include users" to true.
      8. Move on to "Schema"-stage.
      9. Assert user data field for section and data activity are rendered as pre-checked checkboxes.
      10. Finish the backup process.
      11. Start the restore process for the just created backup file.
      12. On the second stage, just select any place to restore the course into.
      13. Assert on "Settings"-stage the "Include users" setting to be false.
      14. Move on to "Schema"-stage.
      15. Assert user data field for section and data activity to be false and rendered as a red x.
      16. Go back to the "Settings"-stage, set "Include users" to true.
      17. Move on to "Schema"-stage.
      18. Assert user data field for section and data activity are rendered as pre-checked checkboxes. user data field of data activity is disabled until the user data field of its section is checked.
      19. Finish the restore process.
      20. Assert the user data to be correctly restored.

      P.S. There is another existing bug MDL-34911 about settings not being preserved when you move to previous stages in the backup process
       

      Show
      Create a course with a data activity and add some user data to it. (See behat test for example) Set the administration settings backup_general_users and restore_general_users to false. Start the backup of the created course. Assert on "Initial"-stage the "Include users" setting to be false. Move on to "Schema"-stage. Assert user data field for section and data activity to be false and rendered as a red x. Go back to the "Initial"-stage, set "Include users" to true. Move on to "Schema"-stage. Assert user data field for section and data activity are rendered as pre-checked checkboxes. Finish the backup process. Start the restore process for the just created backup file. On the second stage, just select any place to restore the course into. Assert on "Settings"-stage the "Include users" setting to be false. Move on to "Schema"-stage. Assert user data field for section and data activity to be false and rendered as a red x. Go back to the "Settings"-stage, set "Include users" to true. Move on to "Schema"-stage. Assert user data field for section and data activity are rendered as pre-checked checkboxes. user data field of data activity is disabled until the user data field of its section is checked. Finish the restore process. Assert the user data to be correctly restored. P.S. There is another existing bug MDL-34911 about settings not being preserved when you move to previous stages in the backup process  
    • Difficulty:
      Difficult
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE, MOODLE_27_STABLE, MOODLE_29_STABLE, MOODLE_30_STABLE, MOODLE_31_STABLE, MOODLE_32_STABLE, MOODLE_33_STABLE, MOODLE_34_STABLE
    • Fixed Branches:
      MOODLE_33_STABLE, MOODLE_34_STABLE
    • Pull Master Branch:
      MDL-27886-master
    • Issue size:
      Small

      Description

      If the "Include users" setting from the "General backup defaults" is set to "no" (unchecked), it is impossible to backup user data.

      According to the documentation this is supposed to be a default setting, i.e. that could be overridden.

      Replication instructions:

      • set "backup_general_users" to false
      • start the process of a course backup
      • check the "Include enrolled users" checkboxe to backup user data, then click "Next"
      • the next screen shows user data is not going to be backed-up

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                35 Vote for this issue
                Watchers:
                24 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  15/Jan/18