migrate.php 858 B

1234567891011121314151617181920212223242526
  1. <?php
  2. /**
  3. * This script executes the migration from a Claroline 1.11.10 system to a
  4. * Chamilo LMS 1.10.0 system.
  5. * This should be launched on the command line to avoid maximum connection
  6. * times defined by the browser or the web server.
  7. * Configuration of the source should be set in the config.php file.
  8. * Configuration of Chamilo is taken from the current folder (current
  9. * already-installed Chamilo portal).
  10. */
  11. require_once __DIR__.'/config.php';
  12. if (!isset($sourceHost)) {
  13. die ('Please define the source and other parameters in config.php'.PHP_EOL);
  14. }
  15. require_once __DIR__.'/../../../../main/inc/global.inc.php';
  16. require_once __DIR__.'/migrate.class.php';
  17. echo "Working" . PHP_EOL;
  18. $migrate = new Migrate();
  19. echo "Migrating users..." . PHP_EOL;
  20. $count = $migrate->migrateUsers();
  21. echo $count . " users migrated." . PHP_EOL;
  22. echo "Done";