Enable course legacy files site-wide and for new courses, prepare two versions of file.jpg with the same name (let's call them v1 and v2)
Scenario 1:
- Create empty course
- Add file.jpg (v1) to course legacy files
- Perform backup
- Replace file.jpg in course legacy files with v2
- Perform restore selecting "merge into current course"
If you look at course legacy files you will see v2 there - file WAS NOT replaced during restore
Scenario 2 (almost the same except item [new]):
- Create empty course
- Add file.jpg (v1) to course legacy files
- [new] Create any module (for example 'File') and add there the file file.jpg as a shortcut
- Perform backup
- Replace file.jpg in course legacy files with v2
- Perform restore selecting "merge into current course"
If you look at course legacy files you will see v1 there - file WAS replaced during restore.
Also there are two modules in course now, the first shows version v2 and the second shows v1. In reality they both are shortcuts to the same file (which is now v1) and the existing shortcut was not synchronised.
I suppose the same will happen if source file was added to course summary or course summary files and maybe even to other modules.
It seems that more correct behaviour is when file is never overwritten during "restore with merging"
- has been marked as being related by
-
MDL-39177 Overwriting files does not observe the "alias" attribute always...
-
- Closed
-