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

Asynchronous course backups should be stored in user backup area

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Waiting for peer review
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.9.2
    • Fix Version/s: None
    • Component/s: Backup
    • Labels:
    • Testing Instructions:
      Hide
      1. Test instructions as admin.
      2. Save course A without user -> course with status process pending should be displayed in the user's save area (ending time-nu.mbz)
      3. Save course B with users -> course with status process pending should be displayed in the course's save area (ending time.mbz)
      4. Save course C with users and anonymization -> course with status process pending should be displayed in the user's security area (ending time-an.mbz)
      5. Run cron and all courses should have the status Backup successful.
      6. on the backup / restorefile.php page of course A nothing should be displayed in the course area and two successful backups in the user area (course A and course C)
      7. on the backup / restorefile.php page of course B, the successful backup of course B should be displayed in the course area and two successful backups of course A and course C in the user area
      8. all over again with activities/course sections
      Show
      Test instructions as admin. Save course A without user -> course with status process pending should be displayed in the user's save area (ending time-nu.mbz) Save course B with users -> course with status process pending should be displayed in the course's save area (ending time.mbz) Save course C with users and anonymization -> course with status process pending should be displayed in the user's security area (ending time-an.mbz) Run cron and all courses should have the status Backup successful. on the backup / restorefile.php page of course A nothing should be displayed in the course area and two successful backups in the user area (course A and course C) on the backup / restorefile.php page of course B, the successful backup of course B should be displayed in the course area and two successful backups of course A and course C in the user area all over again with activities/course sections
    • Affected Branches:
      MOODLE_39_STABLE
    • Pull from Repository:
    • Pull 3.9 Branch:
      MDL-69983-39_save_async_backups_in_correct_area

      Description

      We enabled asynchronous backups in Site Administration / Courses / Backups / Asynchronous backup/restore. Before the backup files without user info or the anonymise functionality were saved in the user backup area. Asynchronous backups are saved in the course backup area. This is incomprehensible for our users. Is there a reason for this behavior?
      This also leads to the problem that course backups are deleted when a course is deleted. This behavior is not expected.

      Couldn't we change backup/util/helper/backup_helper.class.php lines 328-337?

      // Backups without user info or with the anonymise functionality        // enabled are sent to user's "user_backup"       // file area. Maintenance of such area is responsibility of        // the user via corresponding file manager frontend        if (($backupmode == backup::MODE_GENERAL || $backupmode == backup::MODE_ASYNC) && (!$hasusers || $isannon)) {                $ctxid     = context_user::instance($userid)->id;                $component = 'user';               $filearea  = 'backup';                $itemid    = 0;        }

       

        Attachments

          Activity

            People

            Assignee:
            franziskah Franziska Hübler
            Reporter:
            franziskah Franziska Hübler
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
            Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 10 minutes
                10m