Migration Dokeos 185 to Chamilo 20 - Documents


  • Migrates the documents from dokeos 185 to chamilo 2.0
  • Extension of CourseDataMigrationBlock

Files involved

  • /migration/platform/dokeos185/migration_block/course_documents_migration_block.class.php
  • /migration/platform/dokeos185/data_class/dokeos185_document.class.php

Block Prerequisites



General information

  • Extension of Dokeos185CourseDataMigrationClass
  • Database: database_prefix + course_code
  • Table: document

Validation method

1. Required Fields

  • id
  • path
  • filetype
  • insert date

2. Check if file exists

Convert method

Only convert the documents where the type is 'file'. The directories are created when publishing according to the old path of the document.
1 Determine the new path of the document: /files/repository/$new_user_id/$x/
  • $new_user_id is the owner of the document
  • $x is the first char of the md5 hash of the filename
2 Migrate the file.
3 Create a document content object and set the needed properties
4 Now for the publication:
  • If needed create a publication category for every subdirectory the file originally resided. The old document structure is emulated in the publication categories.
  • Publish the document content object.


  • Double files => must be same document instead of new document creation

Please report all problem by creating a new issue in the 2.0 issue list []

Back to Migration Dokeos 1.8.5 to Chamilo 2.0 - General

Updated by Sven Vanpoucke almost 12 years ago ยท 3 revisions