Skip to content

[C2] Documents are duplicated when importing a backup into an empty course with "Rename" option #7400

@Coussecousse

Description

@Coussecousse

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

  1. Create a backup file of a course with documents in it
  2. Create a new course
  3. Upload the backup file and ensure the option "Rename existing files" (default) is selected : Image
  4. 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) :
Image
  • Documents result when chosing "Ecraser les fichiers" in a empty course :
Image

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions