Describe
When importing a course backup containing documents into a new, empty course, the system creates duplicate files if the default collision rule ("Rename existing files") is selected. Since the course is empty, no collision should occur, and files should simply be created without renaming or duplication, no ?
To Reproduce
- Create a backup file of a course with documents in it
- Create a new course
- Upload the backup file and ensure the option "Rename existing files" (default) is selected :

- Navigate to the Documents tool in the new course.
Expected behavior
Files should be imported once (?) as there are no pre-existing files in the target course to trigger a naming conflict.
Screenshots
- Result of documents after importing a backup file and chose the default option (rename) :
- Documents result when chosing "Ecraser les fichiers" in a empty course :
Desktop (please complete the following information):
- OS: Linux Ubuntu 24.04
- Browser : Chrome
Server
- OS: Linux Ubuntu 24.04
- Version of Chamilo: 2
- Version of PHP: 8.3
Describe
When importing a course backup containing documents into a new, empty course, the system creates duplicate files if the default collision rule ("Rename existing files") is selected. Since the course is empty, no collision should occur, and files should simply be created without renaming or duplication, no ?
To Reproduce
Expected behavior
Files should be imported once (?) as there are no pre-existing files in the target course to trigger a naming conflict.
Screenshots
Desktop (please complete the following information):
Server