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

Restore file references from backup

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Testing difficulty: easy, though time consuming

      1. Enable Server files, Private files, Legacy course files and some external repository such as Box.net or Dropbox at your site.
      2. Create a course called Master.
      3. In Master, create a folder called Sources and put some files and images into it.
      4. Enable Legacy course files in Master and put some files and images into it.
      5. Upload some images/files into your Private files repository.
      6. Upload some images/files into the external repository (Dropbox, Box.net).
      7. Still in Master, create another folder called Aliases.
      8. Embed some images from Sources, Legacy files, Private files and the external repository into a) some course section's description, b) into the News forum's description and c) into the Aliases folder - pick them as aliases in all cases.
      9. TEST: Duplicate the Aliases folder using the 2x icon. Make sure that all alias files in it are duplicated and they refer to correct files.
      10. Make a full backup of the Master course and restore it whole into a new course Copy1 at the same site.
      11. TEST: Make sure that the aliases to Server files and Legacy course files now refer to new copies of the files inside Copy1 (not to ones in Master). Aliases to Private files and the external repository are left unchanged.
      12. Use the same backup file, but now select just the folder Aliases as to be included in the restore process (do not include the Sources folder). Restore into a new course Copy2.
      13. TEST: Make sure that aliases refer to the original Source folder in the Master course now.
      14. Restore the whole backup at another site.
      15. TEST: Make sure that now only aliases that refer to some other file also included in the backup are restored. All other are reported as failures at the final stage of the restore process.

      Note: I am not sure but we might want to alter the linked QA test to reflect this new behaviour.

      Show
      Testing difficulty: easy, though time consuming Enable Server files, Private files, Legacy course files and some external repository such as Box.net or Dropbox at your site. Create a course called Master. In Master, create a folder called Sources and put some files and images into it. Enable Legacy course files in Master and put some files and images into it. Upload some images/files into your Private files repository. Upload some images/files into the external repository (Dropbox, Box.net). Still in Master, create another folder called Aliases. Embed some images from Sources, Legacy files, Private files and the external repository into a) some course section's description, b) into the News forum's description and c) into the Aliases folder - pick them as aliases in all cases. TEST: Duplicate the Aliases folder using the 2x icon. Make sure that all alias files in it are duplicated and they refer to correct files. Make a full backup of the Master course and restore it whole into a new course Copy1 at the same site. TEST: Make sure that the aliases to Server files and Legacy course files now refer to new copies of the files inside Copy1 (not to ones in Master). Aliases to Private files and the external repository are left unchanged. Use the same backup file, but now select just the folder Aliases as to be included in the restore process (do not include the Sources folder). Restore into a new course Copy2. TEST: Make sure that aliases refer to the original Source folder in the Master course now. Restore the whole backup at another site. TEST: Make sure that now only aliases that refer to some other file also included in the backup are restored. All other are reported as failures at the final stage of the restore process. Note: I am not sure but we might want to alter the linked QA test to reflect this new behaviour.
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-33430-reference-restore

      Description

      1. When restoring file reference to the local moodle file that can not be found produce a warning to the user.

      2. When backup file contains both source of the reference and the file referencing to it, change the reference so it points to the restored source.

      -------

      Test 1 Restore a folder resource, with links to deleted files

      Test Pre-requisites:

      1. Login as admin/teacher, make sure at least two courses exist
      2. Enable course legacy files for the first course
      3. Add several files to your private files area, and course legacy files, including images
      4. Create an activity module, insert into description images from pre-requisite #3 as alias/shortcuts
      5. Create a new folder resource and add files from pre-requisite #3 as alias/shortcuts

      Test Steps:

      1. Backup the activities and resources created in Pre-requisites #4 and #5 and remove them
      2. Remove sources in private files and course legacy files
      3. Restore activities/resources from backup to another course
      4. Make sure warnings are displayed that reference(s) can not be restored
      5. Make sure references are present, but when clicking on file the error is displayed. In Filemanager the error is shown in the file source. In description there should be just broken images

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  25/Jun/12