-
Functional Test
-
Critical
-
None
-
Original - DO NOT REPORT TEST RESULTS HERE
-
None
Backup and restore with files references
Test Pre-requisites:
- Log in as admin or teacher.
- Enable course legacy files for a first course
- Add several files to your private files area, course legacy files and a folder activity, including images
- Create an activity module, insert into description images from pre-requisite #3 as alias/shortcuts by selecting Link to the file
- Create a new folder resource and add files from pre-requisite #3 as alias/shortcuts by selecting Link to the file
How to create legacy course files
- Enable the legacy course files repository plugin in Administration > Site administration > Plugins > Repositories > Common repository settings.
- Check the legacyfilesinnewcourses box in the Manage repositories common settings (Settings > Site administration > Plugins > Repositories > Common repository settings) then click the 'Save changes' button.
- Set 'Legacy course files' to Yes in the course settings.
- In the course that you enabled 'Legacy course files' go to 'Administration > Course administration > Legacy course files' and upload files here.
How to make sure that file is a reference:
- if the file is in filearea (i.e. file/folder resource), when you edit the filearea the "shortcut" icon is displayed near the file. When you click on file the information window shows the source location. If the file is embedded image - see below
- if you edit the filearea that has the source file (user private files or course legacy files), the source file has the "link" icon. When you click on file the information window shows the list of aliases/shortcuts in the system
- (double check) if you edit the filearea with the source and upload another file with the same name as the source and choose to overwrite, all alias/shortcuts will now show the new file (don't forget to save changes before checking!)
Test Steps:
- Create a backup of the activity and resource created in the test pre-requisites #4 and #5, with 'Include files' and 'Include legacy course files' unchecked in the backup settings, and remove them
- Remove sources in private files and course legacy files
- Restore the backups.
- Verify that you receive warnings about unreachable sources and you can see the human-readable description of where the source was originally located.
- Verify that the referencing files are not present any more in file areas. References to images/video from inside texteditor become broken links.