Moodle
  1. Moodle
  2. MDL-30563

Allow users to select which groups to backup (with or without members)

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Duplicate
    • Affects Version/s: 2.1.3
    • Fix Version/s: None
    • Component/s: Backup, Groups
    • Labels:
    • Database:
      Any
    • Affected Branches:
      MOODLE_21_STABLE
    • Rank:
      33343

      Description

      This issue is dedicated to register the work to make the backup of groups optional in Moodle 2.x (like MDL-18177) and also let the user select which groups will be backed up (like MDL-25485) also allowing the users to select for which groups the members should be backed up too.

      There is a branch with the code in Github on top of moodle/master : https://github.com/danielneis/moodle/tree/backup-groups
      The patch can be found here: https://github.com/danielneis/moodle/compare/moodle-master...backup-groups

      The only part that does not work right now is the groups members selection. For some reason the "set_source_sql" (backup/moodle2/backup_stepslib.php ,line 973) for members does not work as for groups.

        Issue Links

          Activity

          Hide
          Michael de Raadt added a comment -

          I'm a little confused by your description. Are you saying you would like to backup and restore groups selectively between courses?

          Could you please add some detail describing what your idea could be used to achieve?

          Show
          Michael de Raadt added a comment - I'm a little confused by your description. Are you saying you would like to backup and restore groups selectively between courses? Could you please add some detail describing what your idea could be used to achieve?
          Hide
          Daniel Neis added a comment -

          Sorry for the bad description.

          Yes, the idea is to backup and restore groups selectively between courses.

          Our original problem is: i have a course X with Y groups defined and I want to replicate some of these groups into courses Z, K and W. In our university this happens because we can't register these groups and member on the academic control software to synchronize from there to all moodle courses. So, we define it in one moodle course and replicate to others. We do this in 1.9 with the patch from MDL-23186.

          Show
          Daniel Neis added a comment - Sorry for the bad description. Yes, the idea is to backup and restore groups selectively between courses. Our original problem is: i have a course X with Y groups defined and I want to replicate some of these groups into courses Z, K and W. In our university this happens because we can't register these groups and member on the academic control software to synchronize from there to all moodle courses. So, we define it in one moodle course and replicate to others. We do this in 1.9 with the patch from MDL-23186 .
          Hide
          Daniel Neis added a comment - - edited

          Adding screenhots of:

          • options to select if backup will be included (first step)
          • and to select which groups and groups members will be included (second step - not "css formated" yet).
          Show
          Daniel Neis added a comment - - edited Adding screenhots of: options to select if backup will be included (first step) and to select which groups and groups members will be included (second step - not "css formated" yet).
          Hide
          Petr Škoda added a comment -

          I personally find it quite confusing from the UI point of view, if you select groups in backup I would expect it to be somehow usable for user data too, but that might be extremely hard to implement.

          Would it not be easier to have separate enrol+group export/import tool?

          Show
          Petr Škoda added a comment - I personally find it quite confusing from the UI point of view, if you select groups in backup I would expect it to be somehow usable for user data too, but that might be extremely hard to implement. Would it not be easier to have separate enrol+group export/import tool?
          Hide
          Daniel Neis added a comment -

          The ui is not rendering correctly: for each group, the second select box with a "-" label should be on the right,to select if groups members will be copied for that group.
          The code is almost 100% working, we have made the each group dependant of first "include groups" option, and each group member option dependant on the group and if the user can backup user data. The only part that is not working is the replacement of set_source_table with set_source_sql in backup/moodle2/backup_stepslib.php on line 973.

          Trying to do this on the backup is our first attempt, and it is not too much code until now (9 changed files with 103 additions and 9 deletions). We have implemented as a separate tool in Moodle 1.9, in fact it was a patch to the "activity and groups import" interface that now is integrated to backup/restore in moodle 2.x.

          Show
          Daniel Neis added a comment - The ui is not rendering correctly: for each group, the second select box with a "-" label should be on the right,to select if groups members will be copied for that group. The code is almost 100% working, we have made the each group dependant of first "include groups" option, and each group member option dependant on the group and if the user can backup user data. The only part that is not working is the replacement of set_source_table with set_source_sql in backup/moodle2/backup_stepslib.php on line 973. Trying to do this on the backup is our first attempt, and it is not too much code until now (9 changed files with 103 additions and 9 deletions). We have implemented as a separate tool in Moodle 1.9, in fact it was a patch to the "activity and groups import" interface that now is integrated to backup/restore in moodle 2.x.
          Hide
          Michael de Raadt added a comment -

          Rather than having multiple issues addressing this, I'm closing this issue as a duplicate.

          Please participate in MDL-18177.

          Show
          Michael de Raadt added a comment - Rather than having multiple issues addressing this, I'm closing this issue as a duplicate. Please participate in MDL-18177 .

            People

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

              Dates

              • Created:
                Updated:
                Resolved: