Browse Source

Merge branch '1.11.x' of https://github.com/chamilo/chamilo-lms into moddleImport

José Loguercio 8 years ago
parent
commit
41829ab34e
100 changed files with 766 additions and 5204 deletions
  1. 2 0
      .htaccess
  2. 19 16
      .travis.yml
  3. 10 0
      app/Migrations/AbstractMigrationChamilo.php
  4. 0 607
      app/Migrations/Schema/V110/Version110.php
  5. 0 181
      app/Migrations/Schema/V110/Version20150423093100.php
  6. 0 77
      app/Migrations/Schema/V110/Version20150504182600.php
  7. 0 64
      app/Migrations/Schema/V110/Version20150505132304.php
  8. 0 77
      app/Migrations/Schema/V110/Version20150505142900.php
  9. 0 242
      app/Migrations/Schema/V110/Version20150507152600.php
  10. 0 43
      app/Migrations/Schema/V110/Version20150511133949.php
  11. 0 29
      app/Migrations/Schema/V110/Version20150519153200.php
  12. 0 31
      app/Migrations/Schema/V110/Version20150521113600.php
  13. 0 49
      app/Migrations/Schema/V110/Version20150522112023.php
  14. 0 821
      app/Migrations/Schema/V110/Version20150522222222.php
  15. 0 55
      app/Migrations/Schema/V110/Version20150527101600.php
  16. 0 33
      app/Migrations/Schema/V110/Version20150527114220.php
  17. 0 31
      app/Migrations/Schema/V110/Version20150527120703.php
  18. 0 76
      app/Migrations/Schema/V110/Version20150528103216.php
  19. 0 67
      app/Migrations/Schema/V110/Version20150529164400.php
  20. 0 70
      app/Migrations/Schema/V110/Version20150603142550.php
  21. 0 32
      app/Migrations/Schema/V110/Version20150603151200.php
  22. 0 101
      app/Migrations/Schema/V110/Version20150603181728.php
  23. 0 29
      app/Migrations/Schema/V110/Version20150604145047.php
  24. 0 70
      app/Migrations/Schema/V110/Version20150608104600.php
  25. 0 35
      app/Migrations/Schema/V110/Version20150609113500.php
  26. 0 29
      app/Migrations/Schema/V110/Version20150610143426.php
  27. 0 34
      app/Migrations/Schema/V110/Version20150615171900.php
  28. 0 35
      app/Migrations/Schema/V110/Version20150616093200.php
  29. 0 35
      app/Migrations/Schema/V110/Version20150624164100.php
  30. 0 35
      app/Migrations/Schema/V110/Version20150625155000.php
  31. 0 36
      app/Migrations/Schema/V110/Version20150706135000.php
  32. 0 29
      app/Migrations/Schema/V110/Version20150709083710.php
  33. 0 35
      app/Migrations/Schema/V110/Version20150713132630.php
  34. 0 111
      app/Migrations/Schema/V110/Version20150803163400.php
  35. 0 37
      app/Migrations/Schema/V110/Version20150803171220.php
  36. 0 40
      app/Migrations/Schema/V110/Version20150805161000.php
  37. 0 29
      app/Migrations/Schema/V110/Version20150810132615.php
  38. 0 75
      app/Migrations/Schema/V110/Version20150812230500.php
  39. 0 166
      app/Migrations/Schema/V110/Version20150813143000.php
  40. 0 71
      app/Migrations/Schema/V110/Version20150813200000.php
  41. 0 45
      app/Migrations/Schema/V110/Version20150819095300.php
  42. 0 178
      app/Migrations/Schema/V110/Version20150821150000.php
  43. 0 67
      app/Migrations/Schema/V110/Version20150825141100.php
  44. 0 41
      app/Migrations/Schema/V110/Version20151101082200.php
  45. 0 299
      app/Migrations/Schema/V110/Version20151101082300.php
  46. 0 34
      app/Migrations/Schema/V110/Version20151119082400.php
  47. 0 32
      app/Migrations/Schema/V110/Version20151214164000.php
  48. 0 129
      app/Migrations/Schema/V110/Version20151214170800.php
  49. 0 52
      app/Migrations/Schema/V110/Version20151221150100.php
  50. 0 312
      app/Migrations/Schema/V111/Version111.php
  51. 7 6
      app/Migrations/Schema/V111/Version20160330103045.php
  52. 47 0
      app/Migrations/Schema/V111/Version20160628220000.php
  53. 39 0
      app/Migrations/Schema/V111/Version20160701110000.php
  54. 36 0
      app/Migrations/Schema/V111/Version20160705190000.php
  55. 46 0
      app/Migrations/Schema/V111/Version20160705192000.php
  56. 36 0
      app/Migrations/Schema/V111/Version20160706145000.php
  57. 42 0
      app/Migrations/Schema/V111/Version20160706182000.php
  58. 39 0
      app/Migrations/Schema/V111/Version20160712150000.php
  59. 39 0
      app/Migrations/Schema/V111/Version20160713180000.php
  60. 4 4
      app/Resources/public/assets/jquery-file-upload/.bower.json
  61. 1 1
      app/Resources/public/assets/jquery-file-upload/bower.json
  62. 7 1
      app/Resources/public/assets/jquery-file-upload/js/cors/jquery.postmessage-transport.js
  63. 1 1
      app/Resources/public/assets/jquery-file-upload/js/cors/jquery.xdr-transport.js
  64. 1 1
      app/Resources/public/assets/jquery-file-upload/js/jquery.fileupload-angular.js
  65. 1 1
      app/Resources/public/assets/jquery-file-upload/js/jquery.fileupload-audio.js
  66. 1 1
      app/Resources/public/assets/jquery-file-upload/js/jquery.fileupload-image.js
  67. 1 1
      app/Resources/public/assets/jquery-file-upload/js/jquery.fileupload-jquery-ui.js
  68. 1 1
      app/Resources/public/assets/jquery-file-upload/js/jquery.fileupload-process.js
  69. 1 1
      app/Resources/public/assets/jquery-file-upload/js/jquery.fileupload-ui.js
  70. 1 1
      app/Resources/public/assets/jquery-file-upload/js/jquery.fileupload-validate.js
  71. 1 1
      app/Resources/public/assets/jquery-file-upload/js/jquery.fileupload-video.js
  72. 1 1
      app/Resources/public/assets/jquery-file-upload/js/jquery.fileupload.js
  73. 1 1
      app/Resources/public/assets/jquery-file-upload/js/jquery.iframe-transport.js
  74. 4 4
      app/Resources/public/assets/mediaelement/.bower.json
  75. 2 2
      app/Resources/public/assets/mediaelement/build/mediaelement-and-player.js
  76. 0 0
      app/Resources/public/assets/mediaelement/build/mediaelement-and-player.min.js
  77. 2 2
      app/Resources/public/assets/mediaelement/build/mediaelement.js
  78. 0 0
      app/Resources/public/assets/mediaelement/build/mediaelement.min.js
  79. 5 1
      app/Resources/public/assets/mediaelement/changelog.md
  80. 5 5
      app/Resources/public/assets/webcamjs/.bower.json
  81. 6 6
      app/Resources/public/assets/webcamjs/README.md
  82. 1 1
      app/Resources/public/assets/webcamjs/bower.json
  83. 1 1
      app/Resources/public/assets/webcamjs/package.json
  84. 88 34
      app/Resources/public/assets/webcamjs/webcam.js
  85. 0 1
      app/Resources/public/assets/webcamjs/webcam.min.js
  86. BIN
      app/Resources/public/assets/webcamjs/webcam.swf
  87. 147 133
      app/Resources/public/css/base.css
  88. 0 11
      app/Resources/public/css/csshover3.htc
  89. 4 2
      app/Resources/public/css/scorm.css
  90. 2 3
      app/Resources/public/css/themes/chamilo/default.css
  91. 61 28
      app/bootstrap.php.cache
  92. 1 1
      app/cache/.htaccess
  93. 1 2
      app/config/mail.conf.dist.php
  94. 3 3
      certificates/index.php
  95. 2 2
      cli-config.php
  96. 11 72
      composer.json
  97. 10 6
      documentation/installation_guide.html
  98. 7 6
      documentation/installation_guide_es_ES.html
  99. 4 2
      documentation/installation_guide_fr_FR.html
  100. 14 31
      index.php

+ 2 - 0
.htaccess

@@ -23,6 +23,8 @@ RewriteRule ^courses/([^/]+)/index.php$ main/course_home/course_home.php?cDir=$1
 RewriteRule ^courses/([^/]+)/scorm/(.*)$ main/document/download_scorm.php?doc_url=/$2&cDir=$1 [QSA,L]
 
 # Rewrite everything in the document folder of a course to the download script
+# Except certificate resources, which might need to be accessible publicly to all
+RewriteRule ^courses/([^/]+)/document/certificates/(.*)$ app/courses/$1/document/certificates/$2 [QSA,L]
 RewriteRule ^courses/([^/]+)/document/(.*)$ main/document/download.php?doc_url=/$2&cDir=$1 [QSA,L]
 
 # Rewrite everything in the work folder

+ 19 - 16
.travis.yml

@@ -12,6 +12,18 @@ before_install:
   - sudo apt-get update -qq
   - sudo apt-get install -qq mysql-server
   - sudo apt-get install -qq apache2 libapache2-mod-fastcgi
+  # enable php-fpm
+  - sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
+  - sudo a2enmod rewrite actions fastcgi alias
+  - echo "cgi.fix_pathinfo = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
+  - echo "memory_limit = 2G" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
+  - echo "phar.readonly = 0" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
+  - echo "date.timezone = Europe/Paris" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
+  - ~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm
+  # configure apache virtual hosts
+  - sudo cp -f tests/travis-apache /etc/apache2/sites-available/default
+  - sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/default
+  - sudo service apache2 restart
   # Install additional PHP packages (check http://docs.travis-ci.com/user/ci-environment/#CI-environment-OS
   # for pre-installed packages)
   #- sudo apt-get install -qq php5-imagick
@@ -19,12 +31,12 @@ before_install:
   # php is compiled with --enable-fpm, so no install of FPM is needed.
   # However, not installing it generates errors with service php5-fpm restart
   # further down (need to use php-fpm without 5)
-  - sudo apt-get install -qq php5-cli php5-fpm
+  #- sudo apt-get install -qq php5-cli php5-fpm
 
 before_script:
-  - php5 -v
-  - php5 -m
-  - composer self-update
+  #- which composer
+  #- php -d memory_limit=2G /usr/bin/composer update
+  #- php -d memory_limit=2G /home/travis/.phpenv/shims/composer update
   # Previously, fxp/composer-asset-plugin was required but was causing a lot of trouble updating. Now it's disabled.
   #- composer global require "fxp/composer-asset-plugin:1.0.3"
   # You can either use the composer install method and face the Github limit
@@ -43,23 +55,14 @@ before_script:
   # Continue...
   - phpenv config-add tests/travis-php-config.ini
   # enable php-fpm
-  - sudo /etc/init.d/php5-fpm stop
-  - sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
-  - sudo a2enmod rewrite actions fastcgi alias
-  - echo "cgi.fix_pathinfo = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
-  - ~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm
   # configure apache virtual hosts
-  - sudo cp -f tests/travis-apache /etc/apache2/sites-available/default
-  - sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/default
-  - sudo service apache2 restart
-  - sudo service php5-fpm restart
-  - php5 -v
+  - php -v
   # install Chash, a database, and then install Chamilo
   - git clone https://github.com/chamilo/chash
   - cd chash
   - composer install
   - composer update
-  - php5 -d phar.readonly=0 createPhar.php
+  - php -d phar.readonly=0 createPhar.php
   - chmod +x chash.phar
   - sudo mv chash.phar /usr/local/bin/chash
   #- cd ..
@@ -74,7 +77,7 @@ before_script:
   - cd /home/travis/build/chamilo/chamilo-lms
   # There's an issue with Chash, starting in version 1.10, whereby PHP CLI on Travis-ci is PHP5.3, whatever the version you ask for.
   # This effectively breaks the installer and renders these tests useless. We are looking for a solution (for example using containers)
-  - sudo chash chash:chamilo_install --no-interaction --sitename="Chamilo" --site_url="http://localhost/" --institution="Chamilo" --institution_url="https://chamilo.org" --encrypt_method="sha1" --firstname="John" --lastname="Doe" --language="english" --driver="mysqlnd" --host="localhost" --port="3306" --dbname="chamilo" --dbuser="root" --permissions_for_new_directories="0777" --permissions_for_new_files="0666" --linux-user="www-data" --linux-group="www-data" --username="admin" --password="admin" --email="admin@example.com" --phone="555-5555" 1.10.x
+  - sudo chash chash:chamilo_install --no-interaction --sitename="Chamilo" --site_url="http://localhost/" --institution="Chamilo" --institution_url="https://chamilo.org" --encrypt_method="sha1" --firstname="John" --lastname="Doe" --language="english" --driver="pdo_mysql" --host="localhost" --port="3306" --dbname="chamilo" --dbuser="root" --permissions_for_new_directories="0777" --permissions_for_new_files="0666" --linux-user="www-data" --linux-group="www-data" --username="admin" --password="admin" --email="admin@example.com" --phone="555-5555" 1.10.x
 
 script:
   # - phpunit -c tests/phpunit

+ 10 - 0
app/Migrations/AbstractMigrationChamilo.php

@@ -135,4 +135,14 @@ abstract class AbstractMigrationChamilo extends AbstractMigration
         }
         return false;
     }
+    /**
+     * Remove a setting completely
+     * @param string $variable The setting variable name
+     * @return void
+     */
+    public function removeSettingCurrent($variable)
+    {
+        //to be implemented
+    }
+
 }

+ 0 - 607
app/Migrations/Schema/V110/Version110.php

@@ -1,607 +0,0 @@
-<?php
-/* For licensing terms, see /license.txt */
-
-namespace Application\Migrations\Schema\V110;
-
-use Application\Migrations\AbstractMigrationChamilo;
-use Doctrine\DBAL\Schema\Schema;
-use \Doctrine\DBAL\Types\Type;
-
-/**
- * Class Version110
- *
- * Migrate file to updated to Chamilo 1.10
- *
- * @package Application\Migrations\Schema\V110
- */
-class Version110 extends AbstractMigrationChamilo
-{
-    /**
-     * @param Schema $schema
-     */
-    public function preUp(Schema $schema)
-    {
-        $this->addSql("ALTER TABLE session_rel_course ENGINE=InnoDB");
-        $this->addSql("ALTER TABLE session_rel_course_rel_user ENGINE=InnoDB");
-        $this->addSql("ALTER TABLE session_rel_user ENGINE=InnoDB");
-        $this->addSql("UPDATE session SET session.id_coach = 1 WHERE id_coach NOT IN ( SELECT user_id FROM user)");
-    }
-
-    /**
-     * @param Schema $schema
-     *
-     * @throws \Doctrine\DBAL\Schema\SchemaException
-     */
-    public function up(Schema $schema)
-    {
-        // Use $schema->createTable
-        $this->addSql('set sql_mode=""');
-
-        $this->addSql("CREATE TABLE IF NOT EXISTS course_field_options (id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, field_id INT NOT NULL, option_value TEXT, option_display_text VARCHAR(64), option_order INT, tms DATETIME)");
-        $this->addSql("CREATE TABLE IF NOT EXISTS session_field_options (id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, field_id INT NOT NULL, option_value TEXT, option_display_text VARCHAR(64), option_order INT, tms DATETIME)");
-        $this->addSql("CREATE TABLE IF NOT EXISTS hook_observer( id int UNSIGNED NOT NULL AUTO_INCREMENT, class_name varchar(255) UNIQUE, path varchar(255) NOT NULL, plugin_name varchar(255) NULL, PRIMARY KEY PK_hook_management_hook_observer(id))");
-        $this->addSql("CREATE TABLE IF NOT EXISTS hook_event( id int UNSIGNED NOT NULL AUTO_INCREMENT, class_name varchar(255) UNIQUE, description varchar(255), PRIMARY KEY PK_hook_management_hook_event(id))");
-        $this->addSql("CREATE TABLE IF NOT EXISTS hook_call( id int UNSIGNED NOT NULL AUTO_INCREMENT, hook_event_id int UNSIGNED NOT NULL, hook_observer_id int UNSIGNED NOT NULL, type tinyint NOT NULL, hook_order int UNSIGNED NOT NULL, enabled tinyint NOT NULL, PRIMARY KEY PK_hook_management_hook_call(id))");
-        $this->addSql("CREATE TABLE IF NOT EXISTS c_student_publication_rel_document (iid INT NOT NULL PRIMARY KEY, id INT NULL, work_id INT NOT NULL, document_id INT NOT NULL, c_id INT NOT NULL)");
-        $this->addSql("CREATE TABLE IF NOT EXISTS c_student_publication_rel_user (iid INT NOT NULL AUTO_INCREMENT PRIMARY KEY, id INT NULL, work_id INT NOT NULL, user_id INT NOT NULL, c_id INT NOT NULL)");
-        $this->addSql("CREATE TABLE IF NOT EXISTS c_student_publication_comment (iid INT NOT NULL PRIMARY KEY, id INT NULL, work_id INT NOT NULL, c_id INT NOT NULL, comment text, file VARCHAR(255), user_id int NOT NULL, sent_at datetime NOT NULL)");
-        $this->addSql("CREATE TABLE IF NOT EXISTS c_attendance_calendar_rel_group (iid int NOT NULL auto_increment PRIMARY KEY, id INT, c_id INT NOT NULL, group_id INT NOT NULL, calendar_id INT NOT NULL)");
-
-        $this->addSql("ALTER TABLE session MODIFY COLUMN date_start date default NULL, MODIFY COLUMN date_end date default NULL");
-        $this->addSql("ALTER TABLE skill_rel_user MODIFY COLUMN acquired_skill_at datetime default NULL");
-        $this->addSql("ALTER TABLE track_e_access MODIFY COLUMN access_date datetime DEFAULT NULL");
-        $this->addSql("ALTER TABLE track_e_lastaccess MODIFY COLUMN access_date datetime DEFAULT NULL");
-
-        $table = $schema->getTable('skill_rel_user');
-
-        if (!$table->hasColumn('course_id')) {
-            $this->addSql("ALTER TABLE skill_rel_user ADD COLUMN course_id INT NOT NULL DEFAULT 0 AFTER id");
-        }
-
-        if (!$table->hasColumn('session_id')) {
-            $this->addSql("ALTER TABLE skill_rel_user ADD COLUMN session_id INT NOT NULL DEFAULT 0 AFTER course_id");
-        }
-
-        $this->addSql("ALTER TABLE skill_rel_user ADD INDEX idx_select_cs (course_id, session_id)");
-
-        // Delete info of session_rel_user if session does not exists;
-        $this->addSql("DELETE FROM session_rel_user WHERE id_session NOT IN (SELECT id FROM session)");
-
-        // Delete info of usergroup_rel_user if usergroup does not exists;
-        $this->addSql("DELETE FROM usergroup_rel_user WHERE usergroup_id NOT IN (SELECT id FROM usergroup)");
-
-        $session = $schema->getTable('session');
-        $session->getColumn('id')->setType(Type::getType(Type::INTEGER))->setUnsigned(false);
-        if (!$session->hasColumn('description')) {
-            $session->addColumn(
-                'description',
-                'text'
-            );
-        }
-
-        if (!$session->hasColumn('show_description')) {
-            $session->addColumn(
-                'show_description',
-                'smallint',
-                array('default' => 0, 'unsigned' => true)
-            );
-        }
-
-        $sessionTable = $schema->getTable('session');
-        if (!$sessionTable->hasColumn('duration')) {
-            $this->addSql("ALTER TABLE session ADD COLUMN duration int");
-        }
-
-        $sessionRelUser = $schema->getTable('session_rel_user');
-        if (!$sessionRelUser->hasColumn('duration')) {
-            $this->addSql("ALTER TABLE session_rel_user ADD COLUMN duration int");
-        }
-
-        $this->addSql("ALTER TABLE skill ADD COLUMN criteria text");
-        $this->addSql("ALTER TABLE gradebook_category ADD COLUMN generate_certificates TINYINT NOT NULL DEFAULT 0");
-        $this->addSql("ALTER TABLE track_e_access ADD COLUMN c_id int NOT NULL");
-
-        $this->addSql("ALTER TABLE track_e_lastaccess ADD COLUMN c_id int NOT NULL");
-        $this->addSql("ALTER TABLE track_e_exercices ADD COLUMN c_id int NOT NULL");
-        $this->addSql("ALTER TABLE track_e_downloads ADD COLUMN c_id int NOT NULL");
-        $this->addSql("ALTER TABLE track_e_hotpotatoes ADD COLUMN c_id int NOT NULL");
-        $this->addSql("ALTER TABLE track_e_links ADD COLUMN c_id int NOT NULL");
-        $this->addSql("ALTER TABLE track_e_course_access ADD COLUMN c_id int NOT NULL");
-        $this->addSql("ALTER TABLE track_e_online ADD COLUMN c_id int NOT NULL");
-        $this->addSql("ALTER TABLE track_e_attempt ADD COLUMN c_id int NOT NULL");
-        $table = $schema->getTable('track_e_default');
-        if (!$table->hasColumn('session_id')) {
-            $this->addSql("ALTER TABLE track_e_default ADD COLUMN session_id int NOT NULL");
-        }
-
-        if (!$table->hasColumn('c_id')) {
-            $this->addSql("ALTER TABLE track_e_default ADD COLUMN c_id int NOT NULL");
-        }
-
-        $this->addSql("ALTER TABLE track_e_access ADD COLUMN user_ip varchar(39) NOT NULL default ''");
-        $this->addSql("ALTER TABLE track_e_exercices ADD COLUMN user_ip varchar(39) NOT NULL default ''");
-        $this->addSql("ALTER TABLE track_e_course_access ADD COLUMN user_ip varchar(39) NOT NULL default ''");
-        $this->addSql("ALTER TABLE track_e_online CHANGE COLUMN login_ip user_ip varchar(39) NOT NULL DEFAULT ''");
-        $this->addSql("ALTER TABLE track_e_login CHANGE COLUMN login_ip user_ip varchar(39) NOT NULL DEFAULT ''");
-
-		$this->addSql("ALTER TABLE user MODIFY COLUMN user_id int unsigned NOT NULL");
-        $this->addSql("ALTER TABLE user DROP PRIMARY KEY");
-        $this->addSql("ALTER TABLE user MODIFY COLUMN user_id int unsigned DEFAULT NULL");
-        $this->addSql("ALTER TABLE user ADD COLUMN id INT DEFAULT NULL");
-        $this->addSql("UPDATE user SET id = user_id");
-        $this->addSql("ALTER TABLE user MODIFY COLUMN id INT NOT NULL PRIMARY KEY AUTO_INCREMENT AFTER user_id");
-
-        $this->addSql("ALTER TABLE user MODIFY COLUMN chatcall_date datetime default NULL");
-        $this->addSql("ALTER TABLE user MODIFY COLUMN chatcall_text varchar(50) default NULL");
-        $this->addSql("ALTER TABLE user MODIFY COLUMN chatcall_user_id int unsigned default 0");
-        $this->addSql("ALTER TABLE user MODIFY COLUMN expiration_date datetime default NULL");
-        $this->addSql("ALTER TABLE user MODIFY COLUMN registration_date datetime NOT NULL");
-
-        $this->addSql("ALTER TABLE course ADD COLUMN add_teachers_to_sessions_courses tinyint NOT NULL default 0");
-        $this->addSql("ALTER TABLE course DROP COLUMN target_course_code");
-        $this->addSql("ALTER TABLE session MODIFY COLUMN name char(100) NOT NULL DEFAULT ''");
-        $this->addSql("ALTER TABLE course_rel_user ADD COLUMN c_id int default NULL");
-        $this->addSql("ALTER TABLE course_field_values ADD COLUMN c_id int default NULL");
-
-        $this->addSql("ALTER TABLE session_rel_course_rel_user ADD COLUMN c_id int default NULL");
-        $this->addSql("ALTER TABLE session_rel_course_rel_user CHANGE id_session session_id int");
-        $this->addSql("ALTER TABLE session_rel_course_rel_user CHANGE id_user user_id int");
-
-        $this->addSql("ALTER TABLE access_url_rel_course ADD COLUMN c_id int");
-
-        $this->addSql("ALTER TABLE session_rel_course ADD COLUMN position int NOT NULL default 0");
-        $this->addSql("ALTER TABLE session_rel_course ADD COLUMN category varchar(255) default ''");
-        $this->addSql("ALTER TABLE session_rel_course ADD COLUMN c_id int unsigned");
-        $this->addSql("ALTER TABLE session_rel_course CHANGE id_session session_id int");
-
-        $this->addSql("UPDATE course_rel_user SET c_id = (SELECT id FROM course WHERE code = course_code)");
-
-        // Add iid
-        $tables = [
-            'c_announcement',
-            'c_announcement_attachment',
-            'c_attendance',
-            'c_attendance_calendar',
-            //'c_attendance_calendar_rel_group',
-            'c_attendance_result',
-            //'c_attendance_sheet',
-            'c_attendance_sheet_log',
-            //'c_blog',
-            'c_blog_attachment',
-            //'c_blog_comment',
-            //'c_blog_post',
-            //'c_blog_rating',
-            //'c_blog_rel_user',
-            //'c_blog_task',
-            //'c_blog_task_rel_user',
-            'c_calendar_event',
-            'c_calendar_event_attachment',
-            //'c_calendar_event_repeat',
-            //'c_calendar_event_repeat_not',
-            'c_chat_connected',
-            'c_course_description',
-            'c_course_setting',
-            'c_document',
-            //'c_dropbox_category',
-            //'c_dropbox_feedback',
-            'c_dropbox_file',
-            //'c_dropbox_person',
-            //'c_dropbox_post',
-            'c_forum_attachment',
-            //'c_forum_category',
-            //'c_forum_forum',
-            'c_forum_mailcue',
-            'c_forum_notification',
-            //'c_forum_post',
-            //'c_forum_thread',
-            'c_forum_thread_qualify',
-            'c_forum_thread_qualify_log',
-            //'c_glossary',
-            'c_group_category',
-            'c_group_info',
-            'c_group_rel_tutor',
-            'c_group_rel_user',
-            'c_item_property',
-            'c_link',
-            'c_link_category',
-            'c_lp',
-            'c_lp_item',
-            'c_lp_item_view',
-            'c_lp_iv_interaction',
-            'c_lp_iv_objective',
-            'c_lp_view',
-            //'c_notebook',
-            //'c_online_connected',
-            'c_online_link',
-            'c_permission_group',
-            'c_permission_task',
-            'c_permission_user',
-            'c_quiz',
-            //'c_quiz_answer',
-            'c_quiz_question',
-            'c_quiz_question_category',
-            'c_quiz_question_option',
-            //'c_quiz_question_rel_category',
-            //'c_quiz_rel_question',
-            'c_resource',
-            //'c_role',
-            'c_role_group',
-            'c_role_permissions',
-            //'c_role_user',
-            'c_student_publication',
-            'c_student_publication_assignment',
-            //'c_student_publication_comment',
-            //'c_student_publication_rel_document',
-            //'c_student_publication_rel_user',
-            //'c_survey',
-            //'c_survey_answer',
-            'c_survey_group',
-            //'c_survey_invitation',
-            //'c_survey_question',
-            //'c_survey_question_option',
-            'c_thematic',
-            'c_thematic_advance',
-            'c_thematic_plan',
-            'c_tool',
-            //'c_tool_intro',
-            'c_userinfo_content',
-            'c_userinfo_def',
-            'c_wiki',
-            //'c_wiki_conf',
-            'c_wiki_discuss',
-            'c_wiki_mailcue'
-        ];
-
-        foreach ($tables as $table) {
-            if ($schema->hasTable($table)) {
-                $this->addSql("ALTER TABLE $table MODIFY COLUMN id INT NOT NULL");
-                $this->addSql("ALTER TABLE $table MODIFY COLUMN c_id INT NOT NULL");
-                $this->addSql("ALTER TABLE $table DROP PRIMARY KEY");
-                $this->addSql("ALTER TABLE $table MODIFY COLUMN id INT NULL");
-                $this->addSql("ALTER TABLE $table ADD COLUMN iid int NOT NULL PRIMARY KEY AUTO_INCREMENT");
-            }
-        }
-
-        if ($schema->hasTable('c_attendance_calendar_rel_group')) {
-            $this->addSql("ALTER TABLE c_attendance_calendar_rel_group MODIFY COLUMN id INT NOT NULL");
-            $this->addSql("ALTER TABLE c_attendance_calendar_rel_group DROP PRIMARY KEY");
-            $this->addSql("ALTER TABLE c_attendance_calendar_rel_group MODIFY COLUMN id INT NULL DEFAULT NULL");
-            $this->addSql("ALTER TABLE c_attendance_calendar_rel_group ADD COLUMN iid int NOT NULL PRIMARY KEY AUTO_INCREMENT");
-        }
-
-        $this->addSql("ALTER TABLE c_attendance_sheet MODIFY COLUMN c_id INT NOT NULL");
-        $this->addSql("ALTER TABLE c_attendance_sheet DROP PRIMARY KEY");
-        $this->addSql("ALTER TABLE c_attendance_sheet ADD COLUMN iid int NOT NULL PRIMARY KEY AUTO_INCREMENT");
-
-        $this->addSql("ALTER TABLE c_blog MODIFY COLUMN blog_id int unsigned NOT NULL");
-        $this->addSql("ALTER TABLE c_blog MODIFY COLUMN c_id INT NOT NULL");
-        $this->addSql("ALTER TABLE c_blog DROP PRIMARY KEY");
-        $this->addSql("ALTER TABLE c_blog MODIFY COLUMN blog_id int unsigned DEFAULT NULL");
-        $this->addSql("ALTER TABLE c_blog ADD COLUMN iid int  NOT NULL PRIMARY KEY AUTO_INCREMENT");
-
-        $this->addSql("ALTER TABLE c_blog_comment MODIFY COLUMN comment_id int NOT NULL");
-        $this->addSql("ALTER TABLE c_blog_comment MODIFY COLUMN c_id INT NOT NULL");
-        $this->addSql("ALTER TABLE c_blog_comment DROP PRIMARY KEY");
-        $this->addSql("ALTER TABLE c_blog_comment MODIFY COLUMN comment_id int DEFAULT NULL");
-        $this->addSql("ALTER TABLE c_blog_comment ADD COLUMN iid int NOT NULL PRIMARY KEY AUTO_INCREMENT");
-
-        $this->addSql("ALTER TABLE c_blog_post MODIFY COLUMN post_id int unsigned NOT NULL");
-        $this->addSql("ALTER TABLE c_blog_post MODIFY COLUMN c_id INT NOT NULL");
-        $this->addSql("ALTER TABLE c_blog_post DROP PRIMARY KEY");
-        $this->addSql("ALTER TABLE c_blog_post MODIFY COLUMN post_id int unsigned DEFAULT NULL");
-        $this->addSql("ALTER TABLE c_blog_post ADD COLUMN iid int NOT NULL PRIMARY KEY AUTO_INCREMENT");
-
-        $this->addSql("ALTER TABLE c_blog_rating MODIFY COLUMN rating_id int unsigned NOT NULL");
-        $this->addSql("ALTER TABLE c_blog_rating MODIFY COLUMN c_id INT NOT NULL");
-        $this->addSql("ALTER TABLE c_blog_rating DROP PRIMARY KEY");
-        $this->addSql("ALTER TABLE c_blog_rating MODIFY COLUMN rating_id int unsigned DEFAULT NULL");
-        $this->addSql("ALTER TABLE c_blog_rating ADD COLUMN iid int NOT NULL PRIMARY KEY AUTO_INCREMENT");
-
-        $this->addSql("ALTER TABLE c_blog_rel_user DROP PRIMARY KEY");
-        $this->addSql("ALTER TABLE c_blog_rel_user MODIFY COLUMN c_id INT NOT NULL");
-        $this->addSql("ALTER TABLE c_blog_rel_user MODIFY COLUMN blog_id int unsigned DEFAULT NULL");
-        $this->addSql("ALTER TABLE c_blog_rel_user MODIFY COLUMN user_id int unsigned DEFAULT NULL");
-        $this->addSql("ALTER TABLE c_blog_rel_user ADD COLUMN iid int NOT NULL PRIMARY KEY AUTO_INCREMENT");
-
-        $this->addSql("ALTER TABLE c_blog_task MODIFY COLUMN task_id int unsigned NOT NULL");
-        $this->addSql("ALTER TABLE c_blog_task MODIFY COLUMN c_id INT NOT NULL");
-        $this->addSql("ALTER TABLE c_blog_task DROP PRIMARY KEY");
-        $this->addSql("ALTER TABLE c_blog_task MODIFY COLUMN task_id int unsigned DEFAULT NULL");
-        $this->addSql("ALTER TABLE c_blog_task ADD COLUMN iid int NOT NULL PRIMARY KEY AUTO_INCREMENT");
-
-        $this->addSql("ALTER TABLE c_blog_task_rel_user DROP PRIMARY KEY");
-        $this->addSql("ALTER TABLE c_blog_task_rel_user MODIFY COLUMN blog_id int unsigned DEFAULT NULL");
-        $this->addSql("ALTER TABLE c_blog_task_rel_user MODIFY COLUMN user_id int unsigned DEFAULT NULL");
-        $this->addSql("ALTER TABLE c_blog_task_rel_user MODIFY COLUMN task_id int unsigned DEFAULT NULL");
-        $this->addSql("ALTER TABLE c_blog_task_rel_user ADD COLUMN iid int NOT NULL PRIMARY KEY AUTO_INCREMENT");
-
-        $this->addSql("ALTER TABLE c_calendar_event_repeat DROP PRIMARY KEY");
-        $this->addSql("ALTER TABLE c_calendar_event_repeat MODIFY COLUMN cal_id int unsigned DEFAULT NULL");
-        $this->addSql("ALTER TABLE c_calendar_event_repeat MODIFY COLUMN c_id INT NOT NULL");
-        $this->addSql("ALTER TABLE c_calendar_event_repeat ADD COLUMN iid int NOT NULL PRIMARY KEY AUTO_INCREMENT");
-
-        $this->addSql("ALTER TABLE c_calendar_event_repeat_not DROP PRIMARY KEY");
-        $this->addSql("ALTER TABLE c_calendar_event_repeat_not MODIFY COLUMN cal_id int unsigned DEFAULT NULL");
-        $this->addSql("ALTER TABLE c_calendar_event_repeat_not MODIFY COLUMN c_id INT NOT NULL");
-        $this->addSql("ALTER TABLE c_calendar_event_repeat_not ADD COLUMN iid int NOT NULL PRIMARY KEY AUTO_INCREMENT");
-
-        $this->addSql("ALTER TABLE c_dropbox_category MODIFY COLUMN cat_id int unsigned NOT NULL");
-        $this->addSql("ALTER TABLE c_dropbox_category DROP PRIMARY KEY");
-        $this->addSql("ALTER TABLE c_dropbox_category MODIFY COLUMN cat_id int unsigned DEFAULT NULL");
-        $this->addSql("ALTER TABLE c_dropbox_category MODIFY COLUMN c_id INT NOT NULL");
-        $this->addSql("ALTER TABLE c_dropbox_category ADD COLUMN iid int NOT NULL PRIMARY KEY AUTO_INCREMENT");
-
-        $this->addSql("ALTER TABLE c_dropbox_feedback MODIFY COLUMN feedback_id int unsigned NOT NULL");
-        $this->addSql("ALTER TABLE c_dropbox_feedback DROP PRIMARY KEY");
-        $this->addSql("ALTER TABLE c_dropbox_feedback MODIFY COLUMN feedback_id int unsigned DEFAULT NULL");
-        $this->addSql("ALTER TABLE c_dropbox_feedback MODIFY COLUMN c_id INT NOT NULL");
-        $this->addSql("ALTER TABLE c_dropbox_feedback ADD COLUMN iid int NOT NULL PRIMARY KEY AUTO_INCREMENT");
-
-        $this->addSql("ALTER TABLE c_dropbox_person DROP PRIMARY KEY");
-        $this->addSql("ALTER TABLE c_dropbox_person MODIFY COLUMN file_id int unsigned DEFAULT NULL");
-        $this->addSql("ALTER TABLE c_dropbox_person MODIFY COLUMN c_id INT NOT NULL");
-        $this->addSql("ALTER TABLE c_dropbox_person ADD COLUMN iid int NOT NULL PRIMARY KEY AUTO_INCREMENT");
-
-        $this->addSql("ALTER TABLE c_dropbox_post DROP PRIMARY KEY");
-        $this->addSql("ALTER TABLE c_dropbox_post MODIFY COLUMN file_id int unsigned DEFAULT NULL");
-        $this->addSql("ALTER TABLE c_dropbox_post MODIFY COLUMN c_id INT NOT NULL");
-        $this->addSql("ALTER TABLE c_dropbox_post ADD COLUMN iid int NOT NULL PRIMARY KEY AUTO_INCREMENT");
-
-        $this->addSql("ALTER TABLE c_forum_category MODIFY COLUMN cat_id int unsigned NOT NULL");
-        $this->addSql("ALTER TABLE c_forum_category DROP PRIMARY KEY");
-        $this->addSql("ALTER TABLE c_forum_category MODIFY COLUMN cat_id int unsigned DEFAULT NULL");
-        $this->addSql("ALTER TABLE c_forum_category MODIFY COLUMN c_id INT NOT NULL");
-        $this->addSql("ALTER TABLE c_forum_category ADD COLUMN iid int NOT NULL PRIMARY KEY AUTO_INCREMENT");
-
-        $this->addSql("ALTER TABLE c_forum_forum MODIFY COLUMN forum_id int unsigned NOT NULL");
-        $this->addSql("ALTER TABLE c_forum_forum DROP PRIMARY KEY");
-        $this->addSql("ALTER TABLE c_forum_forum MODIFY COLUMN forum_id int unsigned DEFAULT NULL");
-        $this->addSql("ALTER TABLE c_forum_forum MODIFY COLUMN c_id INT NOT NULL");
-        $this->addSql("ALTER TABLE c_forum_forum ADD COLUMN iid int NOT NULL PRIMARY KEY AUTO_INCREMENT");
-
-        $this->addSql("ALTER TABLE c_forum_post MODIFY COLUMN post_id int unsigned NOT NULL");
-        $this->addSql("ALTER TABLE c_forum_post DROP PRIMARY KEY");
-        $this->addSql("ALTER TABLE c_forum_post MODIFY COLUMN post_id int unsigned DEFAULT NULL");
-        $this->addSql("ALTER TABLE c_forum_post MODIFY COLUMN c_id INT NOT NULL");
-        $this->addSql("ALTER TABLE c_forum_post ADD COLUMN iid int NOT NULL PRIMARY KEY AUTO_INCREMENT");
-
-        $this->addSql("ALTER TABLE c_forum_thread MODIFY COLUMN thread_id int unsigned NOT NULL");
-        $this->addSql("ALTER TABLE c_forum_thread DROP PRIMARY KEY");
-        $this->addSql("ALTER TABLE c_forum_thread MODIFY COLUMN forum_id int unsigned DEFAULT NULL");
-        $this->addSql("ALTER TABLE c_forum_thread MODIFY COLUMN c_id INT NOT NULL");
-        $this->addSql("ALTER TABLE c_forum_thread MODIFY COLUMN thread_id int unsigned DEFAULT NULL");
-        $this->addSql("ALTER TABLE c_forum_thread ADD COLUMN iid int NOT NULL PRIMARY KEY AUTO_INCREMENT");
-
-        $this->addSql("ALTER TABLE c_forum_thread ADD COLUMN thread_peer_qualify tinyint default 0");
-
-        $this->addSql("ALTER TABLE c_glossary MODIFY COLUMN glossary_id int unsigned NOT NULL");
-        $this->addSql("ALTER TABLE c_glossary MODIFY COLUMN c_id INT NOT NULL");
-        $this->addSql("ALTER TABLE c_glossary DROP PRIMARY KEY");
-        $this->addSql("ALTER TABLE c_glossary MODIFY COLUMN glossary_id int unsigned DEFAULT NULL");
-        $this->addSql("ALTER TABLE c_glossary ADD COLUMN iid int NOT NULL PRIMARY KEY AUTO_INCREMENT");
-
-        $this->addSql("ALTER TABLE c_notebook MODIFY COLUMN notebook_id int unsigned NOT NULL");
-        $this->addSql("ALTER TABLE c_notebook MODIFY COLUMN c_id INT NOT NULL");
-        $this->addSql("ALTER TABLE c_notebook DROP PRIMARY KEY");
-        $this->addSql("ALTER TABLE c_notebook MODIFY COLUMN notebook_id int unsigned DEFAULT NULL");
-        $this->addSql("ALTER TABLE c_notebook ADD COLUMN iid int NOT NULL PRIMARY KEY AUTO_INCREMENT");
-
-        $this->addSql("ALTER TABLE c_online_connected MODIFY COLUMN c_id INT NOT NULL");
-        $this->addSql("ALTER TABLE c_online_connected DROP PRIMARY KEY");
-        $this->addSql("ALTER TABLE c_online_connected ADD COLUMN iid int NOT NULL PRIMARY KEY AUTO_INCREMENT");
-
-        // For some reason c_tool_intro.id is a varchar in 1.9.x
-        $this->addSql("ALTER TABLE c_tool_intro MODIFY COLUMN id VARCHAR(50) NOT NULL");
-        $this->addSql("ALTER TABLE c_tool_intro MODIFY COLUMN c_id INT NOT NULL");
-        $this->addSql("ALTER TABLE c_tool_intro MODIFY COLUMN session_id int unsigned NOT NULL");
-        $this->addSql("ALTER TABLE c_tool_intro DROP PRIMARY KEY");
-        $this->addSql("ALTER TABLE c_tool_intro MODIFY COLUMN session_id int unsigned DEFAULT NULL");
-        $this->addSql("ALTER TABLE c_tool_intro ADD COLUMN iid int NOT NULL PRIMARY KEY AUTO_INCREMENT");
-
-        $this->addSql("ALTER TABLE c_quiz_answer MODIFY COLUMN c_id INT NOT NULL");
-        $this->addSql("ALTER TABLE c_quiz_answer MODIFY COLUMN id_auto int unsigned NOT NULL");
-        $this->addSql("ALTER TABLE c_quiz_answer DROP PRIMARY KEY");
-        $this->addSql("ALTER TABLE c_quiz_answer MODIFY COLUMN id_auto int unsigned DEFAULT NULL");
-        $this->addSql("ALTER TABLE c_quiz_answer ADD COLUMN iid int NOT NULL PRIMARY KEY AUTO_INCREMENT");
-
-        $this->addSql("ALTER TABLE c_quiz_question_rel_category MODIFY COLUMN c_id INT NOT NULL");
-        $this->addSql("ALTER TABLE c_quiz_question_rel_category MODIFY COLUMN question_id int unsigned NOT NULL");
-        $this->addSql("ALTER TABLE c_quiz_question_rel_category DROP PRIMARY KEY");
-        $this->addSql("ALTER TABLE c_quiz_question_rel_category MODIFY COLUMN question_id int unsigned DEFAULT NULL");
-        $this->addSql("ALTER TABLE c_quiz_question_rel_category ADD COLUMN iid int NOT NULL PRIMARY KEY AUTO_INCREMENT");
-
-        $this->addSql("ALTER TABLE session_rel_user MODIFY COLUMN id_session int");
-        $this->addSql("ALTER TABLE session_rel_user MODIFY COLUMN id_user int");
-        $this->addSql("ALTER TABLE session_rel_user MODIFY COLUMN relation_type int unsigned DEFAULT 0");
-        $this->addSql("ALTER TABLE session_rel_user DROP PRIMARY KEY");
-
-        $this->addSql("ALTER TABLE session_rel_user CHANGE id_session session_id int");
-        $this->addSql("ALTER TABLE session_rel_user CHANGE id_user user_id int");
-        $this->addSql("ALTER TABLE session_rel_user ADD COLUMN id int NOT NULL PRIMARY KEY AUTO_INCREMENT");
-
-        $this->addSql("ALTER TABLE c_item_property CHANGE id_session session_id int");
-        $this->addSql("ALTER TABLE course_rel_user CHANGE tutor_id is_tutor int");
-
-        $this->addSql("ALTER TABLE c_quiz_rel_question MODIFY COLUMN c_id INT NOT NULL");
-        $this->addSql("ALTER TABLE c_quiz_rel_question DROP PRIMARY KEY");
-        $this->addSql("ALTER TABLE c_quiz_rel_question MODIFY COLUMN question_id int unsigned DEFAULT NULL");
-        $this->addSql("ALTER TABLE c_quiz_rel_question MODIFY COLUMN exercice_id int unsigned DEFAULT NULL");
-        $this->addSql("ALTER TABLE c_quiz_rel_question ADD COLUMN iid int NOT NULL PRIMARY KEY AUTO_INCREMENT");
-
-        $this->addSql("ALTER TABLE c_role MODIFY COLUMN role_id int unsigned NOT NULL");
-        $this->addSql("ALTER TABLE c_role MODIFY COLUMN c_id INT NOT NULL");
-        $this->addSql("ALTER TABLE c_role DROP PRIMARY KEY");
-        $this->addSql("ALTER TABLE c_role MODIFY COLUMN role_id int unsigned DEFAULT NULL");
-        $this->addSql("ALTER TABLE c_role ADD COLUMN iid int NOT NULL PRIMARY KEY AUTO_INCREMENT");
-
-        $this->addSql("ALTER TABLE c_role_user DROP PRIMARY KEY");
-        $this->addSql("ALTER TABLE c_role_user MODIFY COLUMN role_id int unsigned DEFAULT NULL");
-        $this->addSql("ALTER TABLE c_role_user MODIFY COLUMN user_id int unsigned DEFAULT NULL");
-        $this->addSql("ALTER TABLE c_role_user MODIFY COLUMN c_id INT NOT NULL");
-        $this->addSql("ALTER TABLE c_role_user ADD COLUMN iid int NOT NULL PRIMARY KEY AUTO_INCREMENT");
-
-        $this->addSql("ALTER TABLE c_survey MODIFY COLUMN survey_id int NOT NULL");
-        $this->addSql("ALTER TABLE c_survey MODIFY COLUMN c_id INT NOT NULL");
-        $this->addSql("ALTER TABLE c_survey DROP PRIMARY KEY");
-        $this->addSql("ALTER TABLE c_survey MODIFY COLUMN survey_id int NULL");
-        $this->addSql("ALTER TABLE c_survey ADD COLUMN iid int NOT NULL PRIMARY KEY AUTO_INCREMENT");
-
-        $this->addSql("ALTER TABLE c_survey_answer MODIFY COLUMN answer_id int unsigned NOT NULL");
-        $this->addSql("ALTER TABLE c_survey_answer MODIFY COLUMN c_id INT NOT NULL");
-        $this->addSql("ALTER TABLE c_survey_answer DROP PRIMARY KEY");
-        $this->addSql("ALTER TABLE c_survey_answer MODIFY COLUMN answer_id int unsigned DEFAULT NULL");
-        $this->addSql("ALTER TABLE c_survey_answer ADD COLUMN iid int NOT NULL PRIMARY KEY AUTO_INCREMENT");
-
-        $this->addSql("ALTER TABLE c_survey_invitation MODIFY COLUMN survey_invitation_id int unsigned NOT NULL");
-        $this->addSql("ALTER TABLE c_survey_invitation MODIFY COLUMN c_id INT NOT NULL");
-        $this->addSql("ALTER TABLE c_survey_invitation DROP PRIMARY KEY");
-        $this->addSql("ALTER TABLE c_survey_invitation MODIFY COLUMN survey_invitation_id int unsigned DEFAULT NULL");
-        $this->addSql("ALTER TABLE c_survey_invitation ADD COLUMN iid int NOT NULL PRIMARY KEY AUTO_INCREMENT");
-
-        $this->addSql("ALTER TABLE c_survey_question MODIFY COLUMN question_id int unsigned NOT NULL");
-        $this->addSql("ALTER TABLE c_survey_question MODIFY COLUMN c_id INT NOT NULL");
-        $this->addSql("ALTER TABLE c_survey_question DROP PRIMARY KEY");
-        $this->addSql("ALTER TABLE c_survey_question MODIFY COLUMN question_id int unsigned DEFAULT NULL");
-        $this->addSql("ALTER TABLE c_survey_question ADD COLUMN iid int NOT NULL PRIMARY KEY AUTO_INCREMENT");
-
-        $this->addSql("ALTER TABLE c_survey_question_option MODIFY COLUMN question_option_id int unsigned NOT NULL");
-        $this->addSql("ALTER TABLE c_survey_question_option MODIFY COLUMN c_id INT NOT NULL");
-        $this->addSql("ALTER TABLE c_survey_question_option DROP PRIMARY KEY");
-        $this->addSql("ALTER TABLE c_survey_question_option MODIFY COLUMN question_option_id int unsigned DEFAULT NULL");
-        $this->addSql("ALTER TABLE c_survey_question_option ADD COLUMN iid int NOT NULL PRIMARY KEY AUTO_INCREMENT");
-
-        $this->addSql("ALTER TABLE c_wiki_conf DROP PRIMARY KEY");
-        $this->addSql("ALTER TABLE c_wiki_conf MODIFY COLUMN page_id int unsigned DEFAULT NULL");
-        $this->addSql("ALTER TABLE c_wiki_conf MODIFY COLUMN c_id INT NOT NULL");
-        $this->addSql("ALTER TABLE c_wiki_conf ADD COLUMN iid int NOT NULL PRIMARY KEY AUTO_INCREMENT");
-
-        // Course
-        $this->addSql("ALTER TABLE c_survey ADD COLUMN visible_results INT UNSIGNED DEFAULT 0");
-        $this->addSql("ALTER TABLE c_survey_invitation ADD COLUMN group_id INT NOT NULL");
-        $this->addSql("ALTER TABLE c_lp_item ADD COLUMN prerequisite_min_score float");
-        $this->addSql("ALTER TABLE c_lp_item ADD COLUMN prerequisite_max_score float");
-        $this->addSql("ALTER TABLE c_group_info ADD COLUMN status tinyint DEFAULT 1");
-        $this->addSql("ALTER TABLE c_student_publication ADD COLUMN document_id int DEFAULT 0");
-        $this->addSql("ALTER TABLE c_lp_item MODIFY COLUMN description VARCHAR(511) DEFAULT ''");
-        $this->addSql("ALTER TABLE course_category MODIFY COLUMN auth_course_child VARCHAR(40) DEFAULT 'TRUE' ");
-        $this->addSql("ALTER TABLE course_category MODIFY COLUMN auth_cat_child VARCHAR(40) DEFAULT 'TRUE'");
-        $this->addSql("ALTER TABLE c_quiz_answer MODIFY COLUMN hotspot_type varchar(40) default NULL");
-        $this->addSql("ALTER TABLE c_tool MODIFY COLUMN target varchar(20) NOT NULL default '_self' ");
-        $this->addSql("ALTER TABLE c_link MODIFY COLUMN on_homepage char(10) NOT NULL default '0' ");
-        $this->addSql("ALTER TABLE c_blog_rating MODIFY COLUMN rating_type char(40) NOT NULL default 'post' ");
-        $this->addSql("ALTER TABLE c_survey MODIFY COLUMN anonymous char(10) NOT NULL default '0'");
-        $this->addSql("ALTER TABLE c_course_setting MODIFY COLUMN value varchar(255) default ''");
-
-        $this->addSql("UPDATE course_field SET field_type = 13 WHERE field_variable = 'special_course'");
-        $this->addSql("UPDATE user SET registration_date = NULL WHERE registration_date = '0000-00-00 00:00:00'");
-        $this->addSql("UPDATE user SET expiration_date = NULL WHERE expiration_date = '0000-00-00 00:00:00'");
-        $this->addSql("UPDATE track_e_default SET default_date = NULL WHERE default_date = '0000-00-00 00:00:00'");
-        $this->addSql("UPDATE track_e_lastaccess SET access_date = NULL WHERE access_date = '0000-00-00 00:00:00'");
-        $this->addSql("UPDATE track_e_downloads SET down_date = NULL WHERE down_date = '0000-00-00 00:00:00'");
-        $this->addSql("UPDATE track_e_access SET access_date = NULL WHERE access_date = '0000-00-00 00:00:00'");
-        $this->addSql("UPDATE track_e_access SET c_id = (SELECT id FROM course WHERE code = access_cours_code)");
-        $this->addSql("UPDATE track_e_default SET c_id = (SELECT id FROM course WHERE code = default_cours_code)");
-        $this->addSql("UPDATE track_e_lastaccess SET c_id = (SELECT id FROM course WHERE code = access_cours_code)");
-        $this->addSql("UPDATE track_e_exercices SET c_id = (SELECT id FROM course WHERE code = exe_cours_id)");
-        $this->addSql("UPDATE track_e_downloads SET c_id = (SELECT id FROM course WHERE code = down_cours_id)");
-        $this->addSql("UPDATE track_e_hotpotatoes SET c_id = (SELECT id FROM course WHERE code = exe_cours_id)");
-        $this->addSql("UPDATE track_e_links SET c_id = (SELECT id FROM course WHERE code = links_cours_id)");
-        $this->addSql("UPDATE track_e_course_access SET c_id = (SELECT id FROM course WHERE code = course_code)");
-        $this->addSql("UPDATE track_e_online SET c_id = (SELECT id FROM course WHERE code = course)");
-        $this->addSql("UPDATE track_e_attempt SET c_id = (SELECT id FROM course WHERE code = course_code)");
-        $this->addSql("UPDATE course_field_values SET c_id = (SELECT id FROM course WHERE code = course_code)");
-        $this->addSql("UPDATE session_rel_course_rel_user SET c_id = (SELECT id FROM course WHERE code = course_code)");
-        $this->addSql("UPDATE session_rel_course SET c_id = (SELECT id FROM course WHERE code = course_code)");
-
-        $this->addSql("UPDATE access_url_rel_course SET c_id = (SELECT id FROM course WHERE code = course_code)");
-
-        $this->addSql("ALTER TABLE settings_current DROP INDEX unique_setting");
-        $this->addSql("ALTER TABLE settings_options DROP INDEX unique_setting_option");
-
-        $this->addSql("DELETE FROM settings_current WHERE variable = 'wcag_anysurfer_public_pages'");
-
-        $this->addSql("DELETE FROM settings_current WHERE variable = 'wcag_anysurfer_public_pages'");
-        $this->addSql("DELETE FROM settings_options WHERE variable = 'wcag_anysurfer_public_pages'");
-        $this->addSql("DELETE FROM settings_current WHERE variable = 'advanced_filemanager'");
-        $this->addSql("DELETE FROM settings_options WHERE variable = 'advanced_filemanager'");
-
-        $this->addSql("INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('institution_address', NULL, 'textfield', 'Platform', '', 'InstitutionAddressTitle', 'InstitutionAddressComment', NULL, NULL, 1)");
-        $this->addSql("INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('prevent_session_admins_to_manage_all_users', NULL, 'radio', 'Session', 'false', 'PreventSessionAdminsToManageAllUsersTitle', 'PreventSessionAdminsToManageAllUsersComment', NULL, NULL, 1)");
-        $this->addSql("INSERT INTO settings_options (variable, value, display_text) VALUES ('prevent_session_admins_to_manage_all_users', 'true', 'Yes'), ('prevent_session_admins_to_manage_all_users', 'false', 'No')");
-        $this->addSql("INSERT INTO settings_options (variable, value, display_text) VALUES ('show_glossary_in_extra_tools', 'none', 'None')");
-        $this->addSql("INSERT INTO settings_options (variable, value, display_text) VALUES ('show_glossary_in_extra_tools', 'exercise', 'Exercise')");
-        $this->addSql("INSERT INTO settings_options (variable, value, display_text) VALUES ('show_glossary_in_extra_tools', 'lp', 'Learning path')");
-        $this->addSql("INSERT INTO settings_options (variable, value, display_text) VALUES ('show_glossary_in_extra_tools', 'exercise_and_lp', 'ExerciseAndLearningPath')");
-        $this->addSql("INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('documents_default_visibility_defined_in_course', NULL,'radio','Tools','false','DocumentsDefaultVisibilityDefinedInCourseTitle','DocumentsDefaultVisibilityDefinedInCourseComment',NULL, NULL, 1)");
-        $this->addSql("INSERT INTO settings_options (variable, value, display_text) VALUES ('documents_default_visibility_defined_in_course', 'true', 'Yes')");
-        $this->addSql("INSERT INTO settings_options (variable, value, display_text) VALUES ('documents_default_visibility_defined_in_course', 'false', 'No')");
-        $this->addSql("INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('enabled_mathjax', NULL, 'radio', 'Editor', 'false', 'EnableMathJaxTitle', 'EnableMathJaxComment', NULL, NULL, 0)");
-        $this->addSql("INSERT INTO settings_options (variable, value, display_text) VALUES ('enabled_mathjax', 'true', 'Yes')");
-        $this->addSql("INSERT INTO settings_options (variable, value, display_text) VALUES ('enabled_mathjax', 'false', 'No')");
-
-        $this->addSql("INSERT INTO language (original_name, english_name, isocode, dokeos_folder, available) VALUES ('Føroyskt', 'faroese', 'fo', 'faroese', 0), ('Tagalog', 'tagalog', 'tl', 'tagalog',1), ('Tibetan', 'tibetan', 'bo', 'tibetan', 0), ('isiXhosa', 'xhosa', 'xh', 'xhosa', 0)");
-        $this->addSql("DELETE FROM settings_options WHERE variable = 'show_glossary_in_extra_tools'");
-
-        $this->addSql("ALTER TABLE c_student_publication MODIFY COLUMN date_of_qualification DATETIME NULL DEFAULT NULL");
-        $this->addSql("ALTER TABLE c_student_publication MODIFY COLUMN sent_date DATETIME NULL DEFAULT NULL");
-        $this->addSql("UPDATE c_student_publication SET date_of_qualification = NULL WHERE date_of_qualification = '0000-00-00 00:00:00'");
-        $this->addSql("UPDATE c_student_publication SET sent_date = NULL WHERE sent_date = '0000-00-00 00:00:00'");
-
-        $this->addSql("ALTER TABLE c_student_publication_assignment MODIFY COLUMN expires_on DATETIME NULL DEFAULT NULL");
-        $this->addSql("ALTER TABLE c_student_publication_assignment MODIFY COLUMN ends_on DATETIME NULL DEFAULT NULL");
-        $this->addSql("UPDATE c_student_publication_assignment SET expires_on = NULL WHERE expires_on = '0000-00-00 00:00:00'");
-        $this->addSql("UPDATE c_student_publication_assignment SET ends_on = NULL WHERE ends_on = '0000-00-00 00:00:00'");
-
-        $this->addSql("UPDATE settings_current SET type = 'checkbox' WHERE variable = 'registration' AND category = 'User'");
-
-        $this->addSql("UPDATE settings_current SET selected_value = 'UTF-8' WHERE variable = 'platform_charset'");
-
-        $this->addSql("ALTER TABLE course_rel_user DROP PRIMARY KEY");
-        $this->addSql("ALTER TABLE course_rel_user ADD COLUMN id INT NOT NULL PRIMARY KEY AUTO_INCREMENT");
-        $this->addSql("ALTER TABLE course_rel_user MODIFY COLUMN user_id INT NULL");
-
-        $this->addSql("ALTER TABLE user MODIFY COLUMN user_id INT NULL");
-
-        $this->addSql("ALTER TABLE access_url_rel_course DROP PRIMARY KEY");
-        $this->addSql("ALTER TABLE access_url_rel_course ADD COLUMN id INT NOT NULL PRIMARY KEY AUTO_INCREMENT");
-        $this->addSql("ALTER TABLE access_url_rel_course DROP COLUMN course_code");
-        $this->addSql("ALTER TABLE access_url_rel_course ADD INDEX idx_select_c (c_id)");
-        $this->addSql("ALTER TABLE access_url_rel_course ADD INDEX idx_select_u (access_url_id)");
-
-        $this->addSql("ALTER TABLE access_url ADD COLUMN url_type TINYINT(1) NULL");
-
-        $this->addSql("ALTER TABLE course_rel_user ADD INDEX idx_select_c (c_id)");
-
-        $this->addSql("ALTER TABLE track_e_uploads ADD COLUMN c_id INT NOT NULL");
-        $this->addSql("UPDATE track_e_uploads SET c_id = (SELECT id FROM course WHERE code = upload_cours_id)");
-
-        //postUp
-        $this->addSql("ALTER TABLE track_e_access DROP COLUMN access_cours_code");
-        $this->addSql("ALTER TABLE track_e_default DROP COLUMN default_cours_code");
-        $this->addSql("ALTER TABLE track_e_lastaccess DROP COLUMN access_cours_code");
-        $this->addSql("ALTER TABLE track_e_exercices DROP COLUMN exe_cours_id");
-        $this->addSql("ALTER TABLE track_e_downloads DROP COLUMN down_cours_id");
-        $this->addSql("ALTER TABLE track_e_hotpotatoes DROP COLUMN exe_cours_id");
-        $this->addSql("ALTER TABLE track_e_links DROP COLUMN links_cours_id");
-        $this->addSql("ALTER TABLE track_e_course_access DROP COLUMN course_code");
-        $this->addSql("ALTER TABLE track_e_online DROP COLUMN course");
-        $this->addSql("ALTER TABLE track_e_attempt DROP COLUMN course_code");
-
-        $this->addSql("ALTER TABLE course_rel_user DROP COLUMN group_id");
-        $this->addSql("ALTER TABLE course_rel_user DROP COLUMN role");
-
-        $this->addSql("DROP TABLE track_c_countries");
-        $this->addSql("DROP TABLE track_c_browsers");
-        $this->addSql("DROP TABLE track_c_os");
-        $this->addSql("DROP TABLE track_c_providers");
-        $this->addSql("DROP TABLE track_c_referers");
-    }
-
-    /**
-     * We don't allow downgrades yet
-     * @param Schema $schema
-     */
-    public function down(Schema $schema)
-    {
-    }
-}

+ 0 - 181
app/Migrations/Schema/V110/Version20150423093100.php

@@ -1,181 +0,0 @@
-<?php
-/* For licensing terms, see /license.txt */
-
-namespace Application\Migrations\Schema\V110;
-
-use Application\Migrations\AbstractMigrationChamilo;
-use Doctrine\DBAL\Schema\Schema;
-use Doctrine\DBAL\Types\Type;
-
-/**
- * Class Version20150423093100
- *
- * @package Application\Migrations\Schema\V110
- */
-class Version20150423093100 extends AbstractMigrationChamilo
-{
-    /**
-     * @param Schema $schema
-     *
-     * @throws \Doctrine\DBAL\Schema\SchemaException
-     */
-    public function up(Schema $schema)
-    {
-        // Sequence changes
-        if (!$schema->hasTable('sequence_rule')) {
-            $sequenceRule = $schema->createTable('sequence_rule');
-            $sequenceRule->addColumn('id', Type::INTEGER)->setAutoincrement(true);
-            $sequenceRule->addColumn('text', Type::TEXT);
-            $sequenceRule->setPrimaryKey(['id']);
-        }
-
-        if (!$schema->hasTable('sequence_condition')) {
-            $sequenceCondition = $schema->createTable('sequence_condition');
-            $sequenceCondition->addColumn('id', Type::INTEGER)->setAutoincrement(true);
-            $sequenceCondition->addColumn('description', Type::TEXT);
-            $sequenceCondition->addColumn('mat_op', Type::INTEGER);
-            $sequenceCondition->addColumn('param', Type::FLOAT);
-            $sequenceCondition->addColumn('act_true', Type::INTEGER);
-            $sequenceCondition->addColumn('act_false', Type::INTEGER);
-            $sequenceCondition->setPrimaryKey(['id']);
-        }
-
-        if (!$schema->hasTable('sequence_rule_condition')) {
-            $sequenceRuleCondition = $schema->createTable('sequence_rule_condition');
-            $sequenceRuleCondition->addColumn('id', Type::INTEGER)->setAutoincrement(true);
-            $sequenceRuleCondition->addColumn('sequence_rule_id', Type::INTEGER)->setNotnull(false);
-            $sequenceRuleCondition->addColumn('sequence_condition_id', Type::INTEGER)->setNotnull(false);
-            $sequenceRuleCondition->setPrimaryKey(['id']);
-            $sequenceRuleCondition->addIndex(['sequence_rule_id']);
-            $sequenceRuleCondition->addIndex(['sequence_condition_id']);
-            $sequenceRuleCondition->addForeignKeyConstraint('sequence_condition', ['sequence_condition_id'], ['id']);
-            $sequenceRuleCondition->addForeignKeyConstraint('sequence_rule', ['sequence_rule_id'], ['id']);
-        }
-
-        if (!$schema->hasTable('sequence_method')) {
-            $sequenceMethod = $schema->createTable('sequence_method');
-            $sequenceMethod->addColumn('id', Type::INTEGER)->setAutoincrement(true);
-            $sequenceMethod->addColumn('description', Type::TEXT);
-            $sequenceMethod->addColumn('formula', Type::TEXT);
-            $sequenceMethod->addColumn('assign', Type::INTEGER);
-            $sequenceMethod->addColumn('met_type', Type::INTEGER);
-            $sequenceMethod->addColumn('act_false', Type::INTEGER);
-            $sequenceMethod->setPrimaryKey(['id']);
-        }
-
-        if (!$schema->hasTable('sequence_rule_method')) {
-            $sequenceRuleMethod = $schema->createTable('sequence_rule_method');
-            $sequenceRuleMethod->addColumn('id', Type::INTEGER)->setAutoincrement(true);
-            $sequenceRuleMethod->addColumn('sequence_rule_id', Type::INTEGER)->setNotnull(false);
-            $sequenceRuleMethod->addColumn('sequence_method_id', Type::INTEGER)->setNotnull(false);
-            $sequenceRuleMethod->addColumn('method_order', Type::INTEGER);
-            $sequenceRuleMethod->setPrimaryKey(['id']);
-            $sequenceRuleMethod->addIndex(['sequence_rule_id']);
-            $sequenceRuleMethod->addIndex(['sequence_method_id']);
-            $sequenceRuleMethod->addForeignKeyConstraint('sequence_method', ['sequence_method_id'], ['id']);
-            $sequenceRuleMethod->addForeignKeyConstraint('sequence_rule', ['sequence_rule_id'], ['id']);
-        }
-
-        if (!$schema->hasTable('sequence_variable')) {
-            $sequenceVariable = $schema->createTable('sequence_variable');
-            $sequenceVariable->addColumn('id', Type::INTEGER)->setAutoincrement(true);
-            $sequenceVariable->addColumn('name', Type::STRING)->setLength(255)->setNotnull(false);
-            $sequenceVariable->addColumn('description', Type::TEXT)->setNotnull(false);
-            $sequenceVariable->addColumn('default_val', Type::STRING)->setLength(255)->setNotnull(false);
-            $sequenceVariable->setPrimaryKey(['id']);
-        }
-
-        if (!$schema->hasTable('sequence_formula')) {
-            $sequenceFormula = $schema->createTable('sequence_formula');
-            $sequenceFormula->addColumn('id', Type::INTEGER)->setAutoincrement(true);
-            $sequenceFormula->addColumn('sequence_method_id', Type::INTEGER)->setNotnull(false);
-            $sequenceFormula->addColumn('sequence_variable_id', Type::INTEGER)->setNotnull(false);
-            $sequenceFormula->setPrimaryKey(['id']);
-            $sequenceFormula->addIndex(['sequence_method_id']);
-            $sequenceFormula->addIndex(['sequence_variable_id']);
-            $sequenceFormula->addForeignKeyConstraint('sequence_variable', ['sequence_variable_id'], ['id']);
-            $sequenceFormula->addForeignKeyConstraint('sequence_method', ['sequence_method_id'], ['id']);
-        }
-
-        if (!$schema->hasTable('sequence_valid')) {
-            $sequenceValid = $schema->createTable('sequence_valid');
-            $sequenceValid->addColumn('id', Type::INTEGER)->setAutoincrement(true);
-            $sequenceValid->addColumn('sequence_variable_id', Type::INTEGER)->setNotnull(false);
-            $sequenceValid->addColumn('sequence_condition_id', Type::INTEGER)->setNotnull(false);
-            $sequenceValid->setPrimaryKey(['id']);
-            $sequenceValid->addIndex(['sequence_variable_id']);
-            $sequenceValid->addIndex(['sequence_condition_id']);
-            $sequenceValid->addForeignKeyConstraint('sequence_condition', ['sequence_condition_id'], ['id']);
-            $sequenceValid->addForeignKeyConstraint('sequence_variable', ['sequence_variable_id'], ['id']);
-        }
-
-        if (!$schema->hasTable('sequence_type_entity')) {
-            $sequenceTypeEntity = $schema->createTable('sequence_type_entity');
-            $sequenceTypeEntity->addColumn('id', Type::INTEGER)->setAutoincrement(true);
-            $sequenceTypeEntity->addColumn('name', Type::STRING)->setLength(255);
-            $sequenceTypeEntity->addColumn('description', Type::TEXT);
-            $sequenceTypeEntity->addColumn('ent_table', Type::STRING)->setLength(255);
-            $sequenceTypeEntity->setPrimaryKey(['id']);
-        }
-
-        if (!$schema->hasTable('sequence_row_entity')) {
-            $sequenceRowEntity = $schema->createTable('sequence_row_entity');
-            $sequenceRowEntity->addColumn('id', Type::INTEGER)->setAutoincrement(true);
-            $sequenceRowEntity->addColumn('sequence_type_entity_id', Type::INTEGER)->setNotnull(false);
-            $sequenceRowEntity->addColumn('c_id', Type::INTEGER);
-            $sequenceRowEntity->addColumn('session_id', Type::INTEGER);
-            $sequenceRowEntity->addColumn('row_id', Type::INTEGER);
-            $sequenceRowEntity->addColumn('name', Type::STRING)->setLength(255);
-            $sequenceRowEntity->setPrimaryKey(['id']);
-            $sequenceRowEntity->addIndex(['sequence_type_entity_id']);
-            $sequenceRowEntity->addForeignKeyConstraint('sequence_type_entity', ['sequence_type_entity_id'], ['id']);
-        }
-
-        if (!$schema->hasTable('sequence')) {
-            $sequence = $schema->createTable('sequence');
-            $sequence->addColumn('id', Type::INTEGER)->setAutoincrement(true);
-            $sequence->addColumn('name', Type::STRING)->setLength(255);
-            $sequence->addColumn('graph', Type::TEXT)->setNotnull(false);
-            $sequence->addColumn('created_at', Type::DATETIME);
-            $sequence->addColumn('updated_at', Type::DATETIME);
-            $sequence->setPrimaryKey(['id']);
-        }
-
-        if (!$schema->hasTable('sequence_value')) {
-            $sequenceValue = $schema->createTable('sequence_value');
-            $sequenceValue->addColumn('id', Type::INTEGER)->setAutoincrement(true);
-            $sequenceValue->addColumn('sequence_row_entity_id', Type::INTEGER)->setNotnull(false);
-            $sequenceValue->addColumn('user_id', Type::INTEGER);
-            $sequenceValue->addColumn('advance', Type::FLOAT);
-            $sequenceValue->addColumn('complete_items', Type::INTEGER);
-            $sequenceValue->addColumn('total_items', Type::INTEGER);
-            $sequenceValue->addColumn('success', Type::BOOLEAN);
-            $sequenceValue->addColumn('success_date', Type::DATETIME)->setNotnull(false);
-            $sequenceValue->addColumn('available', Type::BOOLEAN);
-            $sequenceValue->addColumn('available_start_date', Type::DATETIME)->setNotnull(false);
-            $sequenceValue->addColumn('available_end_date', Type::DATETIME)->setNotnull(false);
-            $sequenceValue->setPrimaryKey(['id']);
-            $sequenceValue->addIndex(['sequence_row_entity_id']);
-            $sequenceValue->addForeignKeyConstraint('sequence_row_entity', ['sequence_row_entity_id'], ['id']);
-        }
-
-        if (!$schema->hasTable('sequence_resource')) {
-            $sequenceResource = $schema->createTable('sequence_resource');
-            $sequenceResource->addColumn('id', Type::INTEGER)->setAutoincrement(true);
-            $sequenceResource->addColumn('sequence_id', Type::INTEGER)->setNotnull(false);
-            $sequenceResource->addColumn('type', Type::INTEGER);
-            $sequenceResource->addColumn('resource_id', Type::INTEGER);
-            $sequenceResource->setPrimaryKey(['id']);
-            $sequenceResource->addIndex(['sequence_id']);
-            $sequenceResource->addForeignKeyConstraint('sequence', ['sequence_id'], ['id']);
-        }
-    }
-
-    /**
-     * We don't allow downgrades yet
-     * @param Schema $schema
-     */
-    public function down(Schema $schema)
-    {
-    }
-}

+ 0 - 77
app/Migrations/Schema/V110/Version20150504182600.php

@@ -1,77 +0,0 @@
-<?php
-/* For licensing terms, see /license.txt */
-
-namespace Application\Migrations\Schema\V110;
-
-use Application\Migrations\AbstractMigrationChamilo;
-use Doctrine\DBAL\Schema\Schema;
-
-/**
- * Class Version20150504182600
- *
- * @package Application\Migrations\Schema\V110
- */
-class Version20150504182600 extends AbstractMigrationChamilo
-{
-    /**
-     * @param Schema $schema
-     *
-     * @throws \Doctrine\DBAL\Schema\SchemaException
-     */
-    public function up(Schema $schema)
-    {
-        // Set parent language to Spanish for all close-by languages. Same for Italian,
-        // French, Portuguese and Chinese
-        $connection = $this->connection;
-        $sql = "SELECT id, english_name
-                FROM language
-                WHERE english_name IN ('spanish', 'italian', 'portuguese', 'simpl_chinese', 'french')";
-        $result = $connection->executeQuery($sql);
-        $dataList = $result->fetchAll();
-        $languages = array();
-
-        if (!empty($dataList)) {
-            foreach ($dataList as $data) {
-                $languages[$data['english_name']] = $data['id'];
-            }
-        }
-        $this->addSql("
-            UPDATE language SET parent_id = " . $languages['spanish'] . " WHERE english_name = 'quechua_cusco'
-        ");
-        $this->addSql("
-            UPDATE language SET parent_id = " . $languages['spanish'] . " WHERE english_name = 'galician'
-        ");
-        $this->addSql("
-            UPDATE language SET parent_id = " . $languages['spanish'] . " WHERE english_name = 'esperanto'
-        ");
-        $this->addSql("
-            UPDATE language SET parent_id = " . $languages['spanish'] . " WHERE english_name = 'catalan'
-        ");
-        $this->addSql("
-            UPDATE language SET parent_id = " . $languages['spanish'] . " WHERE english_name = 'asturian'
-        ");
-        $this->addSql("
-            UPDATE language SET parent_id = " . $languages['spanish'] . " WHERE english_name = 'friulian'
-        ");
-        $this->addSql("
-            UPDATE language SET parent_id = " . $languages['french'] . " WHERE english_name = 'occitan'
-        ");
-        $this->addSql("
-            UPDATE language SET parent_id = " . $languages['portuguese'] . " WHERE english_name = 'brazilian'
-        ");
-        $this->addSql("
-            UPDATE language SET parent_id = " . $languages['simpl_chinese'] . " WHERE english_name = 'trad_chinese'
-        ");
-    }
-
-    /**
-     * We don't allow downgrades yet
-     * @param Schema $schema
-     */
-    public function down(Schema $schema)
-    {
-        $this->addSql("
-            UPDATE language SET parent_id = 0 WHERE english_name IN ('trad_chinese', 'brazilian', 'occitan', 'friulian', 'asturian', 'catalan', 'esperanto', 'galician', 'quechua_cusco')
-        ");
-    }
-}

+ 0 - 64
app/Migrations/Schema/V110/Version20150505132304.php

@@ -1,64 +0,0 @@
-<?php
-/* For licensing terms, see /license.txt */
-
-namespace Application\Migrations\Schema\V110;
-
-use Application\Migrations\AbstractMigrationChamilo;
-use Doctrine\DBAL\Schema\Schema;
-
-/**
- * Extra fields changes
- */
-class Version20150505132304 extends AbstractMigrationChamilo
-{
-    /**
-     * @param Schema $schema
-     */
-    public function up(Schema $schema)
-    {
-        // Force table creation in order to do updates/insert later.
-        $this->connection->executeQuery('CREATE TABLE IF NOT EXISTS extra_field (id INT AUTO_INCREMENT NOT NULL, extra_field_type INT NOT NULL, field_type INT NOT NULL, variable VARCHAR(64) NOT NULL, display_text VARCHAR(255) DEFAULT NULL, default_value LONGTEXT, field_order INT DEFAULT NULL, visible TINYINT(1) DEFAULT NULL, changeable TINYINT(1) DEFAULT NULL, filter TINYINT(1) DEFAULT NULL, created_at DATETIME NOT NULL, PRIMARY KEY(id))');
-        $this->connection->executeQuery('CREATE TABLE IF NOT EXISTS extra_field_values (id INT AUTO_INCREMENT NOT NULL, value VARCHAR(255) DEFAULT NULL, field_id INT NOT NULL, item_id INT NOT NULL, comment LONGTEXT, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, PRIMARY KEY(id))');
-        $this->connection->executeQuery('CREATE TABLE IF NOT EXISTS extra_field_options (id INT AUTO_INCREMENT NOT NULL, field_id INT DEFAULT NULL, option_value LONGTEXT, display_text VARCHAR(64) DEFAULT NULL, option_order INT DEFAULT NULL, priority VARCHAR(255) DEFAULT NULL, priority_message VARCHAR(255) DEFAULT NULL, INDEX IDX_A572E3AE443707B0 (field_id), PRIMARY KEY(id))');
-
-        if (!$schema->hasTable('extra_field_options')) {
-            $this->connection->executeQuery(
-                'ALTER TABLE extra_field_options ADD CONSTRAINT FK_A572E3AE443707B0 FOREIGN KEY (field_id) REFERENCES extra_field (id)'
-            );
-        }
-
-        $this->addSql('CREATE TABLE IF NOT EXISTS extra_field_option_rel_field_option (id INT AUTO_INCREMENT NOT NULL, field_id INT DEFAULT NULL, field_option_id INT DEFAULT NULL, related_field_option_id INT DEFAULT NULL, role_id INT DEFAULT NULL, UNIQUE INDEX idx (field_id, role_id, field_option_id, related_field_option_id), PRIMARY KEY(id))');
-
-        /*
-        $this->addSql('DROP TABLE course_field');
-        $this->addSql('DROP TABLE course_field_options');
-        $this->addSql('DROP TABLE course_field_values');
-        $this->addSql('DROP TABLE session_field');
-        $this->addSql('DROP TABLE session_field_options');
-        $this->addSql('DROP TABLE session_field_values');
-        $this->addSql('DROP TABLE user_field');
-        $this->addSql('DROP TABLE user_field_options');
-        $this->addSql('DROP TABLE user_field_values');
-        */
-    }
-
-    /**
-     * @param Schema $schema
-     */
-    public function postUp(Schema $schema)
-    {
-
-    }
-
-    /**
-     * @param Schema $schema
-     */
-    public function down(Schema $schema)
-    {
-        $this->addSql('ALTER TABLE extra_field_options DROP FOREIGN KEY FK_A572E3AE443707B0');
-        $this->addSql('DROP TABLE extra_field_option_rel_field_option');
-        $this->addSql('DROP TABLE extra_field_options');
-        $this->addSql('DROP TABLE extra_field');
-        $this->addSql('DROP TABLE extra_field_values');
-    }
-}

+ 0 - 77
app/Migrations/Schema/V110/Version20150505142900.php

@@ -1,77 +0,0 @@
-<?php
-/* For licensing terms, see /license.txt */
-
-namespace Application\Migrations\Schema\V110;
-
-use Application\Migrations\AbstractMigrationChamilo;
-use Doctrine\DBAL\Schema\Schema;
-use Doctrine\DBAL\Types\Type;
-
-/**
- * Class Version20150505142900
- *
- * @package Application\Migrations\Schema\V110
- */
-class Version20150505142900 extends AbstractMigrationChamilo
-{
-    /**
-     * @param Schema $schema
-     *
-     * @throws \Doctrine\DBAL\Schema\SchemaException
-     */
-    public function up(Schema $schema)
-    {
-        // Create table for video chat
-        if (!$schema->hasTable('chat_video')) {
-            $chatVideoTable = $schema->createTable('chat_video');
-            $chatVideoTable->addColumn(
-                'id',
-                Type::INTEGER,
-                ['autoincrement' => true, 'notnull' => true]
-            );
-            $chatVideoTable->addColumn(
-                'from_user',
-                Type::INTEGER,
-                ['notnull' => true]
-            );
-            $chatVideoTable->addColumn(
-                'to_user',
-                Type::INTEGER,
-                ['notnull' => true]
-            );
-            $chatVideoTable->addColumn(
-                'room_name',
-                Type::STRING,
-                ['length' => 255, 'notnull' => true]
-            );
-            $chatVideoTable->addColumn(
-                'datetime',
-                Type::DATETIME,
-                ['notnull' => true]
-            );
-            $chatVideoTable->setPrimaryKey(['id']);
-            $chatVideoTable->addIndex(
-                ['from_user'],
-                'idx_chat_video_from_user'
-            );
-            $chatVideoTable->addIndex(['to_user'], 'idx_chat_video_to_user');
-            $chatVideoTable->addIndex(
-                ['from_user', 'to_user'],
-                'idx_chat_video_users'
-            );
-            $chatVideoTable->addIndex(
-                ['room_name'],
-                'idx_chat_video_room_name'
-            );
-        }
-    }
-
-    /**
-     * We don't allow downgrades yet
-     * @param Schema $schema
-     */
-    public function down(Schema $schema)
-    {
-        $schema->dropTable('chat_video');
-    }
-}

+ 0 - 242
app/Migrations/Schema/V110/Version20150507152600.php

@@ -1,242 +0,0 @@
-<?php
-/* For licensing terms, see /license.txt */
-
-namespace Application\Migrations\Schema\V110;
-
-use Application\Migrations\AbstractMigrationChamilo;
-use Doctrine\DBAL\Schema\Schema;
-
-/**
- * Class Version20150507152600
- *
- * @package Application\Migrations\Schema\V110
- */
-class Version20150507152600 extends AbstractMigrationChamilo
-{
-    /**
-     * @param Schema $schema
-     *
-     * @throws \Doctrine\DBAL\Schema\SchemaException
-     */
-    public function up(Schema $schema)
-    {
-        // Move some settings from configuration.php to the database
-        // Current settings categories are:
-        // Platform, Course, Session, Languages, User, Tools, Editor, Security,
-        // Tuning, Gradebook, Timezones, Tracking, Search, stylesheets (lowercase),
-        // LDAP, CAS, Shibboleth, Facebook
-
-        // Setting $_configuration['hide_home_top_when_connected'] = true;
-        $value = $this->getConfigurationValue('hide_home_top_when_connected');
-
-        $this->addSettingCurrent(
-            'hide_home_top_when_connected',
-            '',
-            'radio',
-            'Platform',
-            ($value ? 'true' : 'false'),
-            'HideHomeTopContentWhenLoggedInText',
-            'HideHomeTopContentWhenLoggedInComment',
-            null,
-            '',
-            1,
-            true,
-            false,
-            [
-                0 => ['value' => 'true', 'text' => 'Yes'],
-                1 => ['value' => 'false', 'text' => 'No'],
-            ]
-        );
-
-        // Hide the global announcements for non-connected users
-        //$_configuration['hide_global_announcements_when_not_connected'] = true;
-        $value = $this->getConfigurationValue('hide_global_announcements_when_not_connected');
-        $this->addSettingCurrent(
-            'hide_global_announcements_when_not_connected',
-            '',
-            'radio',
-            'Platform',
-            ($value?'true':'false'),
-            'HideGlobalAnnouncementsWhenNotLoggedInText',
-            'HideGlobalAnnouncementsWhenNotLoggedInComment',
-            null,
-            '',
-            1,
-            true,
-            false,
-            [
-                0 => ['value' => 'true', 'text' => 'Yes'],
-                1 => ['value' => 'false', 'text' => 'No'],
-            ]
-        );
-
-        // Use this course as template for all new courses (define course real ID as value)
-        //$_configuration['course_creation_use_template'] = 14;
-        $value = $this->getConfigurationValue('course_creation_use_template');
-        $this->addSettingCurrent(
-            'course_creation_use_template',
-            '',
-            'textfield',
-            'Course',
-            ($value?$value:''),
-            'CourseCreationUsesTemplateText',
-            'CourseCreationUsesTemplateComment',
-            null,
-            '',
-            1,
-            true,
-            false,
-            [
-                0 => ['value' => 'true', 'text' => 'Yes'],
-                1 => ['value' => 'false', 'text' => 'No'],
-            ]
-        );
-
-        // Add password strength checker
-        //$_configuration['allow_strength_pass_checker'] = true;
-        $value = $this->getConfigurationValue('allow_strength_pass_checker');
-        $this->addSettingCurrent(
-            'allow_strength_pass_checker',
-            '',
-            'radio',
-            'Security',
-            ($value?'true':'false'),
-            'EnablePasswordStrengthCheckerText',
-            'EnablePasswordStrengthCheckerComment',
-            null,
-            '',
-            1,
-            true,
-            false,
-            [
-                0 => ['value' => 'true', 'text' => 'Yes'],
-                1 => ['value' => 'false', 'text' => 'No'],
-            ]
-        );
-
-        // Enable captcha
-        // $_configuration['allow_captcha'] = true;
-        $value = $this->getConfigurationValue('allow_captcha');
-        $this->addSettingCurrent(
-            'allow_captcha',
-            '',
-            'radio',
-            'Security',
-            ($value?'true':'false'),
-            'EnableCaptchaText',
-            'EnableCaptchaComment',
-            null,
-            '',
-            1,
-            true,
-            false,
-            [0 => ['value' => 'true', 'text' => 'Yes'], 1 => ['value' => 'false', 'text' => 'No']]
-        );
-        // Prevent account from logging in for a certain amount of time
-        // if captcha is wrong for the specified number of times
-        //$_configuration['captcha_number_mistakes_to_block_account'] = 5;
-        $value = $this->getConfigurationValue('captcha_number_mistakes_to_block_account');
-        $this->addSettingCurrent(
-            'captcha_number_mistakes_to_block_account',
-            '',
-            'textfield',
-            'Security',
-            ($value?$value:5),
-            'CaptchaNumberOfMistakesBeforeBlockingAccountText',
-            'CaptchaNumberOfMistakesBeforeBlockingAccountComment',
-            null,
-            '',
-            1,
-            true,
-            false
-        );
-        // Prevent account from logging in for the specified number of minutes
-        //$_configuration['captcha_time_to_block'] = 5;//minutes
-        $value = $this->getConfigurationValue('captcha_time_to_block');
-        $this->addSettingCurrent(
-            'captcha_time_to_block',
-            '',
-            'textfield',
-            'Security',
-            ($value?$value:5),
-            'CaptchaTimeAccountIsLockedText',
-            'CaptchaTimeAccountIsLockedComment',
-            null,
-            '',
-            1,
-            true,
-            false
-        );
-
-        // Allow DRH role to access all content and users from the sessions he follows
-        //$_configuration['drh_can_access_all_session_content'] = true;
-        $value = $this->getConfigurationValue('drh_can_access_all_session_content');
-        $this->addSettingCurrent(
-            'drh_can_access_all_session_content',
-            '',
-            'radio',
-            'Session',
-            ($value?'true':'false'),
-            'DRHAccessToAllSessionContentText',
-            'DRHAccessToAllSessionContentComment',
-            null,
-            '',
-            1,
-            true,
-            false,
-            [0 => ['value' => 'true', 'text' => 'Yes'], 1 => ['value' => 'false', 'text' => 'No']]
-        );
-
-        // Display group's forum in general forum tool
-        //$_configuration['display_groups_forum_in_general_tool'] = true;
-        $value = $this->getConfigurationValue('display_groups_forum_in_general_tool');
-        $this->addSettingCurrent(
-            'display_groups_forum_in_general_tool',
-            '',
-            'radio',
-            'Tools',
-            ($value?'true':'false'),
-            'ShowGroupForaInGeneralToolText',
-            'ShowGroupForaInGeneralToolComment',
-            null,
-            '',
-            1,
-            true,
-            false,
-            [0 => ['value' => 'true', 'text' => 'Yes'], 1 => ['value' => 'false', 'text' => 'No']]
-        );
-
-        // Allow course tutors in sessions to add existing students to their session
-        //$_configuration['allow_tutors_to_assign_students_to_session'] = 'false';
-        $value = $this->getConfigurationValue('allow_tutors_to_assign_students_to_session');
-        $this->addSettingCurrent(
-            'allow_tutors_to_assign_students_to_session',
-            '',
-            'radio',
-            'Session',
-            ($value?'true':'false'),
-            'TutorsCanAssignStudentsToSessionsText',
-            'TutorsCanAssignStudentsToSessionsComment',
-            null,
-            '',
-            1,
-            true,
-            false,
-            [0 => ['value' => 'true', 'text' => 'Yes'], 1 => ['value' => 'false', 'text' => 'No']]
-        );
-    }
-
-    /**
-     * We don't allow downgrades yet
-     * @param Schema $schema
-     */
-    public function down(Schema $schema)
-    {
-        $this->addSql("
-            DELETE FROM settings_options WHERE variable IN ('hide_home_top_when_connected', 'hide_global_announcements_when_not_connected', 'course_creation_use_template', 'allow_strength_pass_checker', 'allow_captcha', 'captcha_number_mistakes_to_block_account', 'captcha_time_to_block', 'drh_can_access_all_session_content', 'display_groups_forum_in_general_tool', 'allow_tutors_to_assign_students_to_session')
-        ");
-        $this->addSql("
-            DELETE FROM settings_current WHERE variable IN ('hide_home_top_when_connected', 'hide_global_announcements_when_not_connected', 'course_creation_use_template', 'allow_strength_pass_checker', 'allow_captcha', 'captcha_number_mistakes_to_block_account', 'captcha_time_to_block', 'drh_can_access_all_session_content', 'display_groups_forum_in_general_tool', 'allow_tutors_to_assign_students_to_session')
-        ");
-    }
-}

+ 0 - 43
app/Migrations/Schema/V110/Version20150511133949.php

@@ -1,43 +0,0 @@
-<?php
-/* For licensing terms, see /license.txt */
-
-namespace Application\Migrations\Schema\V110;
-
-use Application\Migrations\AbstractMigrationChamilo;
-use Doctrine\DBAL\Schema\Schema;
-
-/**
- * Username changes
- */
-class Version20150511133949 extends AbstractMigrationChamilo
-{
-    /**
-     * @param Schema $schema
-     */
-    public function up(Schema $schema)
-    {
-        $this->addSql('ALTER TABLE user ADD salt VARCHAR(255) NOT NULL');
-        $this->addSql('ALTER TABLE user ADD username_canonical VARCHAR(100) NOT NULL');
-        //$this->addSql('CREATE UNIQUE INDEX UNIQ_8D93D64992FC23A8 ON user (username_canonical)');
-        $this->addSql('ALTER TABLE user CHANGE password password VARCHAR(255) NOT NULL');
-
-        $this->addSql("INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('allow_teachers_to_create_sessions', NULL,'radio','Session','false','AllowTeachersToCreateSessionsTitle','AllowTeachersToCreateSessionsComment', NULL, NULL, 0)");
-        $this->addSql("INSERT INTO settings_options (variable, value, display_text) VALUES ('allow_teachers_to_create_sessions', 'true', 'Yes')");
-        $this->addSql("INSERT INTO settings_options (variable, value, display_text) VALUES ('allow_teachers_to_create_sessions', 'false', 'No')");
-
-    }
-
-    /**
-     * @param Schema $schema
-     */
-    public function down(Schema $schema)
-    {
-        $this->addSql('ALTER TABLE user DROP salt');
-        $this->addSql('DROP INDEX UNIQ_8D93D64992FC23A8 ON user');
-        $this->addSql('ALTER TABLE user DROP username_canonical');
-        $this->addSql('ALTER TABLE user CHANGE password password VARCHAR(50) NOT NULL COLLATE utf8_unicode_ci');
-
-        $this->addSql('DELETE FROM settings_current WHERE variable = "allow_teachers_to_create_sessions" ');
-        $this->addSql('DELETE FROM settings_options WHERE variable = "allow_teachers_to_create_sessions" ');
-    }
-}

+ 0 - 29
app/Migrations/Schema/V110/Version20150519153200.php

@@ -1,29 +0,0 @@
-<?php
-/* For licensing terms, see /license.txt */
-
-namespace Application\Migrations\Schema\V110;
-
-use Application\Migrations\AbstractMigrationChamilo;
-use Doctrine\DBAL\Schema\Schema;
-
-/**
- * Username changes
- */
-class Version20150519153200 extends AbstractMigrationChamilo
-{
-    /**
-     * @param Schema $schema
-     */
-    public function up(Schema $schema)
-    {
-        $this->addSql('ALTER TABLE session_rel_user ADD COLUMN registered_at DATETIME NOT NULL');
-    }
-
-    /**
-     * @param Schema $schema
-     */
-    public function down(Schema $schema)
-    {
-        $this->addSql('ALTER TABLE session_rel_user DROP COLUMN registered_at');
-    }
-}

+ 0 - 31
app/Migrations/Schema/V110/Version20150521113600.php

@@ -1,31 +0,0 @@
-<?php
-/* For licensing terms, see /license.txt */
-
-namespace Application\Migrations\Schema\V110;
-
-use Application\Migrations\AbstractMigrationChamilo;
-use Doctrine\DBAL\Schema\Schema;
-
-/**
- * Username changes
- */
-class Version20150521113600 extends AbstractMigrationChamilo
-{
-    /**
-     * @param Schema $schema
-     */
-    public function up(Schema $schema)
-    {
-        $this->addSql('ALTER TABLE c_forum_thread MODIFY thread_replies int UNSIGNED NOT NULL DEFAULT 0');
-        $this->addSql('ALTER TABLE c_forum_thread MODIFY thread_views int UNSIGNED NOT NULL DEFAULT 0');
-    }
-
-    /**
-     * @param Schema $schema
-     */
-    public function down(Schema $schema)
-    {
-        $this->addSql('ALTER TABLE c_forum_thread MODIFY thread_replies int NULL');
-        $this->addSql('ALTER TABLE c_forum_thread MODIFY thread_views int NULL');
-    }
-}

+ 0 - 49
app/Migrations/Schema/V110/Version20150522112023.php

@@ -1,49 +0,0 @@
-<?php
-/* For licensing terms, see /license.txt */
-
-namespace Application\Migrations\Schema\V110;
-
-use Application\Migrations\AbstractMigrationChamilo;
-use Doctrine\DBAL\Schema\Schema;
-
-/**
- * Usergroup changes
- */
-class Version20150522112023 extends AbstractMigrationChamilo
-{
-    /**
-     * @param Schema $schema
-     */
-    public function up(Schema $schema)
-    {
-        // Set 0 if there's no group category.
-        $this->addSql('UPDATE c_group_info SET category_id = 0 WHERE category_id = 2');
-
-        $this->addSql('ALTER TABLE usergroup ADD group_type INT NOT NULL, ADD created_at DATETIME NOT NULL, ADD updated_at DATETIME NOT NULL');
-        $this->addSql('ALTER TABLE usergroup ADD picture VARCHAR(255) DEFAULT NULL, ADD url VARCHAR(255) DEFAULT NULL, ADD visibility VARCHAR(255) NOT NULL, ADD allow_members_leave_group INT NOT NULL, CHANGE description description LONGTEXT');
-        $this->addSql('CREATE TABLE usergroup_rel_usergroup (id INT AUTO_INCREMENT NOT NULL, group_id INT NOT NULL, subgroup_id INT NOT NULL, relation_type INT NOT NULL, PRIMARY KEY(id))');
-        $this->addSql('ALTER TABLE usergroup_rel_user ADD relation_type INT');
-
-        if (!$schema->hasTable('access_url_rel_usergroup')) {
-            $this->addSql(
-                'CREATE TABLE access_url_rel_usergroup (id INT AUTO_INCREMENT NOT NULL, access_url_id INT NOT NULL, usergroup_id INT NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB'
-            );
-            $sql = 'SELECT * FROM usergroup';
-            $result = $this->connection->query($sql);
-            $results = $result->fetchAll();
-            foreach ($results as $result) {
-                $groupId = $result['id'];
-                $sql = "INSERT INTO access_url_rel_usergroup (access_url_id, usergroup_id) VALUES ('1', '$groupId')";
-                $this->addSql($sql);
-            }
-        }
-    }
-
-    /**
-     * @param Schema $schema
-     */
-    public function down(Schema $schema)
-    {
-        $this->addSql('DROP TABLE access_url_rel_usergroup');
-    }
-}

+ 0 - 821
app/Migrations/Schema/V110/Version20150522222222.php

@@ -1,821 +0,0 @@
-<?php
-/* For licensing terms, see /license.txt */
-
-namespace Application\Migrations\Schema\V110;
-
-use Application\Migrations\AbstractMigrationChamilo;
-use Doctrine\DBAL\Schema\Schema;
-
-/**
- * Class Version20150522222222
- * @package Application\Migrations\Schema\V11010
- */
-class Version20150522222222 extends AbstractMigrationChamilo
-{
-    /**
-     * @param Schema $schema
-     */
-    public function up(Schema $schema)
-    {
-        // The first ALTER queries here requires a check because the field might already exist
-        $connection = $this->connection;
-        $fieldExists = false;
-        $sql = "SELECT *
-                FROM user
-                LIMIT 1";
-        $result = $connection->executeQuery($sql);
-        $dataList = $result->fetchAll();
-        if (!empty($dataList)) {
-            foreach ($dataList as $data) {
-                if (isset($data['last_login'])) {
-                    $fieldExists = true;
-                }
-            }
-        }
-        if (!$fieldExists) {
-            $this->addSql('ALTER TABLE user ADD COLUMN last_login datetime DEFAULT NULL');
-        }
-        // calendar events comments
-        $fieldExists = false;
-        $sql = "SELECT *
-                FROM c_calendar_event
-                LIMIT 1";
-        $result = $connection->executeQuery($sql);
-        $dataList = $result->fetchAll();
-        if (!empty($dataList)) {
-            foreach ($dataList as $data) {
-                if (isset($data['comment'])) {
-                    $fieldExists = true;
-                }
-            }
-        }
-        if (!$fieldExists) {
-            $this->addSql("ALTER TABLE c_calendar_event ADD COLUMN comment TEXT");
-        }
-
-        // Move some settings from configuration.php to the database
-        // Current settings categories are:
-        // Platform, Course, Session, Languages, User, Tools, Editor, Security,
-        // Tuning, Gradebook, Timezones, Tracking, Search, stylesheets (lowercase),
-        // LDAP, CAS, Shibboleth, Facebook
-
-        // Allow select the return link in the LP view
-        $value = $this->getConfigurationValue('allow_lp_return_link');
-        $this->addSettingCurrent(
-            'allow_lp_return_link',
-            '',
-            'radio',
-            'Course',
-            ($value?$value:'true'),
-            'AllowLearningPathReturnLinkTitle',
-            'AllowLearningPathReturnLinkComment',
-            null,
-            '',
-            1,
-            true,
-            false,
-            [0 => ['value' => 'true', 'text' => 'Yes'], 1 => ['value' => 'false', 'text' => 'No']]
-        );
-
-        // If true the export link is blocked.
-        $value = $this->getConfigurationValue('hide_scorm_export_link');
-        $this->addSettingCurrent(
-            'hide_scorm_export_link',
-            '',
-            'radio',
-            'Course',
-            ($value?$value:'false'),
-            'HideScormExportLinkTitle',
-            'HideScormExportLinkComment',
-            null,
-            '',
-            1,
-            true,
-            false,
-            [0 => ['value' => 'true', 'text' => 'Yes'], 1 => ['value' => 'false', 'text' => 'No']]
-        );
-
-        // If true the copy link is blocked.
-        //$_configuration['hide_scorm_copy_link'] = false;
-        $value = $this->getConfigurationValue('hide_scorm_copy_link');
-        $this->addSettingCurrent(
-            'hide_scorm_copy_link',
-            '',
-            'radio',
-            'Course',
-            ($value?$value:'false'),
-            'HideScormCopyLinkTitle',
-            'HideScormCopyLinkComment',
-            null,
-            '',
-            1,
-            true,
-            false,
-            [0 => ['value' => 'true', 'text' => 'Yes'], 1 => ['value' => 'false', 'text' => 'No']]
-        );
-
-        // If true the pdf export link is blocked.
-        //$_configuration['hide_scorm_pdf_link'] = false;
-        $value = $this->getConfigurationValue('hide_scorm_pdf_link');
-        $this->addSettingCurrent(
-            'hide_scorm_pdf_link',
-            '',
-            'radio',
-            'Course',
-            ($value?$value:'false'),
-            'HideScormPdfLinkTitle',
-            'HideScormPdfLinkComment',
-            null,
-            '',
-            1,
-            true,
-            false,
-            [0 => ['value' => 'true', 'text' => 'Yes'], 1 => ['value' => 'false', 'text' => 'No']]
-        );
-
-        // Default session days before coach access
-        //$_configuration['session_days_before_coach_access'] = 0;
-        $value = $this->getConfigurationValue('session_days_before_coach_access');
-        $this->addSettingCurrent(
-            'session_days_before_coach_access',
-            '',
-            'textfield',
-            'Session',
-            ($value?$value:'0'),
-            'SessionDaysBeforeCoachAccessTitle',
-            'SessionDaysBeforeCoachAccessComment',
-            null,
-            '',
-            1,
-            true,
-            false
-        );
-
-
-        // Default session days after coach access
-        //$_configuration['session_days_after_coach_access'] = 0;
-        $value = $this->getConfigurationValue('session_days_after_coach_access');
-        $this->addSettingCurrent(
-            'session_days_after_coach_access',
-            '',
-            'textfield',
-            'Session',
-            ($value?$value:'0'),
-            'SessionDaysAfterCoachAccessTitle',
-            'SessionDaysAfterCoachAccessComment',
-            null,
-            '',
-            1,
-            true,
-            false
-        );
-
-        // PDF Logo header in app/Resources/public/css/themes/xxx/images/pdf_logo_header.png
-        //$_configuration['pdf_logo_header'] = false;
-        $value = $this->getConfigurationValue('pdf_logo_header');
-        $this->addSettingCurrent(
-            'pdf_logo_header',
-            '',
-            'radio',
-            'Course',
-            ($value?$value:'false'),
-            'PdfLogoHeaderTitle',
-            'PdfLogoHeaderComment',
-            null,
-            '',
-            1,
-            true,
-            false,
-            [0 => ['value' => 'true', 'text' => 'Yes'], 1 => ['value' => 'false', 'text' => 'No']]
-        );
-
-        // Order inscription user list by official_code
-        //$_configuration['order_user_list_by_official_code'] = false;
-        $value = $this->getConfigurationValue('order_user_list_by_official_code');
-        $this->addSettingCurrent(
-            'order_user_list_by_official_code',
-            '',
-            'radio',
-            'Platform',
-            ($value?$value:'false'),
-            'OrderUserListByOfficialCodeTitle',
-            'OrderUserListByOfficialCodeComment',
-            null,
-            '',
-            1,
-            true,
-            false,
-            [0 => ['value' => 'true', 'text' => 'Yes'], 1 => ['value' => 'false', 'text' => 'No']]
-        );
-
-        // Default course setting "email_alert_manager_on_new_quiz"
-        //$_configuration['email_alert_manager_on_new_quiz'] = 1;
-        $value = $this->getConfigurationValue('email_alert_manager_on_new_quiz');
-        $this->addSettingCurrent(
-            'email_alert_manager_on_new_quiz',
-            '',
-            'radio',
-            'Course',
-            ($value?$value:'true'),
-            'AlertManagerOnNewQuizTitle',
-            'AlertManagerOnNewQuizComment',
-            null,
-            '',
-            1,
-            true,
-            false,
-            [0 => ['value' => 'true', 'text' => 'Yes'], 1 => ['value' => 'false', 'text' => 'No']]
-        );
-
-        // Show official code in exercise report list.
-        //$_configuration['show_official_code_exercise_result_list'] = false;
-        $value = $this->getConfigurationValue('show_official_code_exercise_result_list');
-        $this->addSettingCurrent(
-            'show_official_code_exercise_result_list',
-            '',
-            'radio',
-            'Tools',
-            ($value?$value:'false'),
-            'ShowOfficialCodeInExerciseResultListTitle',
-            'ShowOfficialCodeInExerciseResultListComment',
-            null,
-            '',
-            1,
-            true,
-            false,
-            [0 => ['value' => 'true', 'text' => 'Yes'], 1 => ['value' => 'false', 'text' => 'No']]
-        );
-
-
-        // Hide private courses from course catalog
-        //$_configuration['course_catalog_hide_private'] = false;
-        $value = $this->getConfigurationValue('course_catalog_hide_private');
-        $this->addSettingCurrent(
-            'course_catalog_hide_private',
-            '',
-            'radio',
-            'Platform',
-            ($value?$value:'false'),
-            'HidePrivateCoursesFromCourseCatalogTitle',
-            'HidePrivateCoursesFromCourseCatalogComment',
-            null,
-            '',
-            1,
-            true,
-            false,
-            [0 => ['value' => 'true', 'text' => 'Yes'], 1 => ['value' => 'false', 'text' => 'No']]
-        );
-
-        // Display sessions catalog
-        // 0 = show only courses; 1 = show only sessions; 2 = show courses and sessions
-        //$_configuration['catalog_show_courses_sessions'] = 0;
-        $value = $this->getConfigurationValue('catalog_show_courses_sessions');
-        $this->addSettingCurrent(
-            'catalog_show_courses_sessions',
-            '',
-            'radio',
-            'Platform',
-            ($value?$value:'0'),
-            'CoursesCatalogueShowSessionsTitle',
-            'CoursesCatalogueShowSessionsComment',
-            null,
-            '',
-            1,
-            true,
-            false,
-            [0 => ['value' => '0', 'text' => 'CatalogueShowOnlyCourses'], 1 => ['value' => '1', 'text' => 'CatalogueShowOnlySessions'], 2 => ['value' => '2', 'text' => 'CatalogueShowCoursesAndSessions']]
-        );
-
-        // Auto detect language custom pages.
-        // $_configuration['auto_detect_language_custom_pages'] = true;
-        $value = $this->getConfigurationValue('auto_detect_language_custom_pages');
-        $this->addSettingCurrent(
-            'auto_detect_language_custom_pages',
-            '',
-            'radio',
-            'Platform',
-            ($value?$value:'true'),
-            'AutoDetectLanguageCustomPagesTitle',
-            'AutoDetectLanguageCustomPagesComment',
-            null,
-            '',
-            1,
-            true,
-            false,
-            [0 => ['value' => 'true', 'text' => 'Yes'], 1 => ['value' => 'false', 'text' => 'No']]
-        );
-
-        // Show reduce LP report
-        //$_configuration['lp_show_reduced_report'] = false;
-        $value = $this->getConfigurationValue('lp_show_reduced_report');
-        $this->addSettingCurrent(
-            'lp_show_reduced_report',
-            '',
-            'radio',
-            'Tools',
-            ($value?$value:'false'),
-            'LearningPathShowReducedReportTitle',
-            'LearningPathShowReducedReportComment',
-            null,
-            '',
-            1,
-            true,
-            false,
-            [0 => ['value' => 'true', 'text' => 'Yes'], 1 => ['value' => 'false', 'text' => 'No']]
-        );
-
-        //Allow session-to-session copy
-        //$_configuration['allow_session_course_copy_for_teachers'] = true;
-        $value = $this->getConfigurationValue('allow_session_course_copy_for_teachers');
-        $this->addSettingCurrent(
-            'allow_session_course_copy_for_teachers',
-            '',
-            'radio',
-            'Session',
-            ($value?$value:'false'),
-            'AllowSessionCourseCopyForTeachersTitle',
-            'AllowSessionCourseCopyForTeachersComment',
-            null,
-            '',
-            1,
-            true,
-            false,
-            [0 => ['value' => 'true', 'text' => 'Yes'], 1 => ['value' => 'false', 'text' => 'No']]
-        );
-
-        // Hide the logout button
-        //$_configuration['hide_logout_button'] = true;
-        $value = $this->getConfigurationValue('hide_logout_button');
-        $this->addSettingCurrent(
-            'hide_logout_button',
-            '',
-            'radio',
-            'Security',
-            ($value?$value:'false'),
-            'HideLogoutButtonTitle',
-            'HideLogoutButtonComment',
-            null,
-            '',
-            1,
-            true,
-            false,
-            [0 => ['value' => 'true', 'text' => 'Yes'], 1 => ['value' => 'false', 'text' => 'No']]
-        );
-
-        // Prevent redirecting admin to admin page
-        //$_configuration['redirect_admin_to_courses_list'] = true;
-        $value = $this->getConfigurationValue('redirect_admin_to_courses_list');
-        $this->addSettingCurrent(
-            'redirect_admin_to_courses_list',
-            '',
-            'radio',
-            'Platform',
-            ($value?$value:'false'),
-            'RedirectAdminToCoursesListTitle',
-            'RedirectAdminToCoursesListComment',
-            null,
-            '',
-            1,
-            true,
-            false,
-            [0 => ['value' => 'true', 'text' => 'Yes'], 1 => ['value' => 'false', 'text' => 'No']]
-        );
-
-        // Shows the custom course icon instead of the classic green board icon
-        //$_configuration['course_images_in_courses_list'] = false;
-        $value = $this->getConfigurationValue('course_images_in_courses_list');
-        $this->addSettingCurrent(
-            'course_images_in_courses_list',
-            '',
-            'radio',
-            'Course',
-            ($value?$value:'false'),
-            'CourseImagesInCoursesListTitle',
-            'CourseImagesInCoursesListComment',
-            null,
-            '',
-            1,
-            true,
-            false,
-            [0 => ['value' => 'true', 'text' => 'Yes'], 1 => ['value' => 'false', 'text' => 'No']]
-        );
-
-        // Which student publication will be taken when connected to the gradebook: first|last
-        //$_configuration['student_publication_to_take_in_gradebook'] = 'first';
-        $value = $this->getConfigurationValue('student_publication_to_take_in_gradebook');
-        $this->addSettingCurrent(
-            'student_publication_to_take_in_gradebook',
-            '',
-            'radio',
-            'Gradebook',
-            ($value?$value:'first'),
-            'StudentPublicationSelectionForGradebookTitle',
-            'StudentPublicationSelectionForGradebookComment',
-            null,
-            '',
-            1,
-            true,
-            false,
-            [0 => ['value' => 'first', 'text' => 'First'], 1 => ['value' => 'last', 'text' => 'Last']]
-        );
-
-        // Show a filter by official code
-        //$_configuration['certificate_filter_by_official_code'] = false;
-        $value = $this->getConfigurationValue('certificate_filter_by_official_code');
-        $this->addSettingCurrent(
-            'certificate_filter_by_official_code',
-            '',
-            'radio',
-            'Gradebook',
-            ($value?$value:'false'),
-            'FilterCertificateByOfficialCodeTitle',
-            'FilterCertificateByOfficialCodeComment',
-            null,
-            '',
-            1,
-            true,
-            false,
-            [0 => ['value' => 'true', 'text' => 'Yes'], 1 => ['value' => 'false', 'text' => 'No']]
-        );
-
-        // Max quantity of fkceditor allowed in the exercise result page otherwise
-        // Textareas are used.
-        //$_configuration['exercise_max_ckeditors_in_page'] = 0;
-        $value = $this->getConfigurationValue('exercise_max_ckeditors_in_page');
-        $this->addSettingCurrent(
-            'exercise_max_ckeditors_in_page',
-            '',
-            'textfield',
-            'Tools',
-            ($value?$value:'0'),
-            'MaxCKeditorsOnExerciseResultsPageTitle',
-            'MaxCKeditorsOnExerciseResultsPageComment',
-            null,
-            '',
-            1,
-            true,
-            false,
-            array()
-        );
-
-        // Default upload option
-        //$_configuration['document_if_file_exists_option'] = 'rename'; // overwrite
-        $value = $this->getConfigurationValue('document_if_file_exists_option');
-        $this->addSettingCurrent(
-            'document_if_file_exists_option',
-            '',
-            'radio',
-            'Tools',
-            ($value?$value:'rename'),
-            'DocumentDefaultOptionIfFileExistsTitle',
-            'DocumentDefaultOptionIfFileExistsComment',
-            null,
-            '',
-            1,
-            true,
-            false,
-            [0 => ['value' => 'rename', 'text' => 'Rename'], 1 => ['value' => 'overwrite', 'text' => 'Overwrite']]
-        );
-        // Enable add_gradebook_certificates.php cron task
-        //$_configuration['add_gradebook_certificates_cron_task_enabled'] = true;
-        $value = $this->getConfigurationValue('add_gradebook_certificates_cron_task_enabled');
-        $this->addSettingCurrent(
-            'add_gradebook_certificates_cron_task_enabled',
-            '',
-            'radio',
-            'Tools',
-            ($value?$value:'false'),
-            'GradebookCronTaskGenerationTitle',
-            'GradebookCronTaskGenerationComment',
-            null,
-            '',
-            1,
-            true,
-            false,
-            [0 => ['value' => 'true', 'text' => 'Yes'], 1 => ['value' => 'false', 'text' => 'No']]
-        );
-
-        // Which OpenBadges backpack send the badges
-        //$_configuration['openbadges_backpack'] = 'https://backpack.openbadges.org/';
-        $value = $this->getConfigurationValue('openbadges_backpack');
-        $this->addSettingCurrent(
-            'openbadges_backpack',
-            '',
-            'textfield',
-            'Gradebook',
-            ($value?$value:'https://backpack.openbadges.org/'),
-            'OpenBadgesBackpackUrlTitle',
-            'OpenBadgesBackpackUrlComment',
-            null,
-            '',
-            1,
-            true,
-            false,
-            []
-        );
-
-        // Shows a warning message explaining that the site uses cookies
-        //$_configuration['cookie_warning'] = false;
-        $value = $this->getConfigurationValue('cookie_warning');
-        $this->addSettingCurrent(
-            'cookie_warning',
-            '',
-            'radio',
-            'Tools',
-            ($value?$value:'false'),
-            'CookieWarningTitle',
-            'CookieWarningComment',
-            null,
-            '',
-            1,
-            true,
-            false,
-            [0 => ['value' => 'true', 'text' => 'Yes'], 1 => ['value' => 'false', 'text' => 'No']]
-        );
-
-        // If there are any tool available and the user is not registered hide the group
-        //$_configuration['hide_course_group_if_no_tools_available'] = false;
-        $value = $this->getConfigurationValue('hide_course_group_if_no_tools_available');
-        $this->addSettingCurrent(
-            'hide_course_group_if_no_tools_available',
-            '',
-            'radio',
-            'Tools',
-            ($value?$value:'false'),
-            'HideCourseGroupIfNoToolAvailableTitle',
-            'HideCourseGroupIfNoToolAvailableComment',
-            null,
-            '',
-            1,
-            true,
-            false,
-            [0 => ['value' => 'true', 'text' => 'Yes'], 1 => ['value' => 'false', 'text' => 'No']]
-        );
-
-        // Allow student to enroll into a session without an approval needing
-        //$_configuration['catalog_allow_session_auto_subscription'] = false;
-        $value = $this->getConfigurationValue('catalog_allow_session_auto_subscription');
-        $this->addSettingCurrent(
-            'catalog_allow_session_auto_subscription',
-            '',
-            'radio',
-            'Session',
-            ($value?$value:'false'),
-            'CatalogueAllowSessionAutoSubscriptionTitle',
-            'CatalogueAllowSessionAutoSubscriptionComment',
-            null,
-            '',
-            1,
-            true,
-            false,
-            [0 => ['value' => 'true', 'text' => 'Yes'], 1 => ['value' => 'false', 'text' => 'No']]
-        );
-
-        // Decode UTF-8 from Web Services (option passed to SOAP)
-        //$_configuration['registration.soap.php.decode_utf8'] = false;
-        $value = $this->getConfigurationValue('registration.soap.php.decode_utf8');
-        $this->addSettingCurrent(
-            'registration.soap.php.decode_utf8',
-            '',
-            'radio',
-            'Platform',
-            ($value?$value:'false'),
-            'SoapRegistrationDecodeUtf8Title',
-            'SoapRegistrationDecodeUtf8Comment',
-            null,
-            '',
-            1,
-            true,
-            false,
-            [0 => ['value' => 'true', 'text' => 'Yes'], 1 => ['value' => 'false', 'text' => 'No']]
-        );
-
-        // Show delete option in attendance
-        //$_configuration['allow_delete_attendance'] = false;
-        $value = $this->getConfigurationValue('allow_delete_attendance');
-        $this->addSettingCurrent(
-            'allow_delete_attendance',
-            '',
-            'radio',
-            'Tools',
-            ($value?$value:'false'),
-            'AttendanceDeletionEnableTitle',
-            'AttendanceDeletionEnableComment',
-            null,
-            '',
-            1,
-            true,
-            false,
-            [0 => ['value' => 'true', 'text' => 'Yes'], 1 => ['value' => 'false', 'text' => 'No']]
-        );
-
-        // Enable Gravatar profile image if no local image has been given
-        //$_configuration['gravatar_enabled'] = true;
-        $value = $this->getConfigurationValue('gravatar_enabled');
-        $this->addSettingCurrent(
-            'gravatar_enabled',
-            '',
-            'radio',
-            'Platform',
-            ($value?$value:'false'),
-            'GravatarPicturesTitle',
-            'GravatarPicturesComment',
-            null,
-            '',
-            1,
-            true,
-            false,
-            [0 => ['value' => 'true', 'text' => 'Yes'], 1 => ['value' => 'false', 'text' => 'No']]
-        );
-
-        // If Gravatar is enabled, tells which type of picture we want (default is "mm").
-        // Options: mm | identicon | monsterid | wavatar
-        //$_configuration['gravatar_type'] = 'mm';
-        $value = $this->getConfigurationValue('gravatar_type');
-        $this->addSettingCurrent(
-            'gravatar_type',
-            '',
-            'radio',
-            'Platform',
-            ($value?$value:'mm'),
-            'GravatarPicturesTypeTitle',
-            'GravatarPicturesTypeComment',
-            null,
-            '',
-            1,
-            true,
-            false,
-            [
-                0 => ['value' => 'mm', 'text' => 'mystery-man'],
-                1 => ['value' => 'identicon', 'text' => 'identicon'],
-                2 => ['value' => 'monsterid', 'text' => 'monsterid'],
-                3 => ['value' => 'wavatar', 'text' => 'wavatar']
-            ]
-        );
-
-        // Limit for the Session Admin role. The administration page show only
-        // User block -> Add user
-        // Course Sessions block -> Training session list
-        //$_configuration['limit_session_admin_role'] = false;
-        $value = $this->getConfigurationValue('limit_session_admin_role');
-        $this->addSettingCurrent(
-            'limit_session_admin_role',
-            '',
-            'radio',
-            'Session',
-            ($value?$value:'false'),
-            'SessionAdminPermissionsLimitTitle',
-            'SessionAdminPermissionsLimitComment',
-            null,
-            '',
-            1,
-            true,
-            false,
-            [0 => ['value' => 'true', 'text' => 'Yes'], 1 => ['value' => 'false', 'text' => 'No']]
-        );
-
-        // Show session description
-        //$_configuration['show_session_description'] = false;
-        $value = $this->getConfigurationValue('show_session_description');
-        $this->addSettingCurrent(
-            'show_session_description',
-            '',
-            'radio',
-            'Session',
-            ($value?$value:'false'),
-            'ShowSessionDescriptionTitle',
-            'ShowSessionDescriptionComment',
-            null,
-            '',
-            1,
-            true,
-            false,
-            [0 => ['value' => 'true', 'text' => 'Yes'], 1 => ['value' => 'false', 'text' => 'No']]
-        );
-
-        // Hide only for students the link to export certificates to PDF
-        //$_configuration['hide_certificate_export_link_students'] = false;
-        $value = $this->getConfigurationValue('hide_certificate_export_link_students');
-        $this->addSettingCurrent(
-            'hide_certificate_export_link_students',
-            '',
-            'radio',
-            'Gradebook',
-            ($value?$value:'false'),
-            'CertificateHideExportLinkStudentTitle',
-            'CertificateHideExportLinkStudentComment',
-            null,
-            '',
-            1,
-            true,
-            false,
-            [0 => ['value' => 'true', 'text' => 'Yes'], 1 => ['value' => 'false', 'text' => 'No']]
-        );
-
-        // Hide for all user roles the link to export certificates to PDF
-        //$_configuration['hide_certificate_export_link'] = false;
-        $value = $this->getConfigurationValue('hide_certificate_export_link');
-        $this->addSettingCurrent(
-            'hide_certificate_export_link',
-            '',
-            'radio',
-            'Gradebook',
-            ($value?$value:'false'),
-            'CertificateHideExportLinkTitle',
-            'CertificateHideExportLinkComment',
-            null,
-            '',
-            1,
-            true,
-            false,
-            [0 => ['value' => 'true', 'text' => 'Yes'], 1 => ['value' => 'false', 'text' => 'No']]
-        );
-
-        // Hide session course coach in dropbox sent to user list
-        //$_configuration['dropbox_hide_course_coach'] = false;
-        $value = $this->getConfigurationValue('dropbox_hide_course_coach');
-        $this->addSettingCurrent(
-            'dropbox_hide_course_coach',
-            '',
-            'radio',
-            'Tools',
-            ($value ? $value : 'false'),
-            'DropboxHideCourseCoachTitle',
-            'DropboxHideCourseCoachComment',
-            null,
-            '',
-            1,
-            true,
-            false,
-            [0 => ['value' => 'true', 'text' => 'Yes'], 1 => ['value' => 'false', 'text' => 'No']]
-        );
-
-        $value = $this->getConfigurationValue('dropbox_hide_general_coach');
-        $this->addSettingCurrent(
-            'dropbox_hide_general_coach',
-            '',
-            'radio',
-            'Tools',
-            ($value ? $value : 'false'),
-            'DropboxHideGeneralCoachTitle',
-            'DropboxHideGeneralCoachComment',
-            null,
-            '',
-            1,
-            true,
-            false,
-            [0 => ['value' => 'true', 'text' => 'Yes'], 1 => ['value' => 'false', 'text' => 'No']]
-        );
-
-        // If SSO is used, the redirection to the master server is forced.
-        //$_configuration['force_sso_redirect'] = false;
-        $value = $this->getConfigurationValue('force_sso_redirect');
-        $this->addSettingCurrent(
-            'sso_force_redirect',
-            '',
-            'radio',
-            'Security',
-            ($value?$value:'false'),
-            'SSOForceRedirectTitle',
-            'SSOForceRedirectComment',
-            null,
-            '',
-            1,
-            true,
-            false,
-            [0 => ['value' => 'true', 'text' => 'Yes'], 1 => ['value' => 'false', 'text' => 'No']]
-        );
-
-        // Session course ordering in the the session view.
-        // false = alphabetic order (default)
-        // true = based in the session course list
-        //$_configuration['session_course_ordering'] = false;
-        $value = $this->getConfigurationValue('session_course_ordering');
-        $this->addSettingCurrent(
-            'session_course_ordering',
-            '',
-            'radio',
-            'Session',
-            ($value?$value:'false'),
-            'SessionCourseOrderingTitle',
-            'SessionCourseOrderingComment',
-            null,
-            '',
-            1,
-            true,
-            false,
-            [0 => ['value' => 'true', 'text' => 'Yes'], 1 => ['value' => 'false', 'text' => 'No']]
-        );
-    }
-
-    /**
-     * @param Schema $schema
-     */
-    public function down(Schema $schema)
-    {
-        $this->addSql("DELETE FROM settings_options WHERE variable IN ('session_course_ordering', 'sso_force_redirect', 'dropbox_hide_course_coach', 'hide_certificate_export_link', 'hide_certificate_export_link_students', 'show_session_description', 'limit_session_admin_role', 'gravatar_type', 'gravatar_enabled', 'allow_delete_attendance', 'registration.soap.php.decode_utf8', 'catalog_allow_session_auto_subscription', 'hide_course_group_if_no_tools_available', 'cookie_warning', 'openbadges_backpack', 'add_gradebook_certificates_cron_task_enabled', 'document_if_file_exists_option', 'exercise_max_ckeditors_in_page', 'certificate_filter_by_official_code', 'student_publication_to_take_in_gradebook', 'course_images_in_courses_list', 'redirect_admin_to_courses_list', 'hide_logout_button', 'allow_session_course_copy_for_teachers', 'lp_show_reduced_report', 'auto_detect_language_custom_pages', 'catalog_show_courses_sessions', 'course_catalog_hide_private', 'show_official_code_exercise_result_list', 'allow_lp_return_link', 'hide_scorm_export_link', 'hide_scorm_copy_link', 'hide_scorm_pdf_link', 'session_days_before_coach_access', 'session_days_after_coach_access', 'pdf_logo_header', 'order_user_list_by_official_code', 'email_alert_manager_on_new_quiz')");
-        $this->addSql("DELETE FROM settings_current WHERE variable IN ('session_course_ordering', 'sso_force_redirect', 'dropbox_hide_course_coach', 'hide_certificate_export_link', 'hide_certificate_export_link_students', 'show_session_description', 'limit_session_admin_role', 'gravatar_type', 'gravatar_enabled', 'allow_delete_attendance', 'registration.soap.php.decode_utf8', 'catalog_allow_session_auto_subscription', 'hide_course_group_if_no_tools_available', 'cookie_warning', 'openbadges_backpack', 'add_gradebook_certificates_cron_task_enabled', 'document_if_file_exists_option', 'exercise_max_ckeditors_in_page', 'certificate_filter_by_official_code', 'student_publication_to_take_in_gradebook', 'course_images_in_courses_list', 'redirect_admin_to_courses_list', 'hide_logout_button', 'allow_session_course_copy_for_teachers', 'lp_show_reduced_report', 'auto_detect_language_custom_pages', 'catalog_show_courses_sessions', 'course_catalog_hide_private', 'show_official_code_exercise_result_list', 'allow_lp_return_link', 'hide_scorm_export_link', 'hide_scorm_copy_link', 'hide_scorm_pdf_link', 'session_days_before_coach_access', 'session_days_after_coach_access', 'pdf_logo_header', 'order_user_list_by_official_code', 'email_alert_manager_on_new_quiz')");
-
-        $this->addSql('ALTER TABLE user DROP COLUMN last_login');
-    }
-}

+ 0 - 55
app/Migrations/Schema/V110/Version20150527101600.php

@@ -1,55 +0,0 @@
-<?php
-/* For licensing terms, see /license.txt */
-
-namespace Application\Migrations\Schema\V110;
-
-use Application\Migrations\AbstractMigrationChamilo;
-use Doctrine\DBAL\Schema\Schema;
-
-/**
- * Class Version20150527120703
- * LP autolunch -> autolaunch
- * @package Application\Migrations\Schema\V11010
- */
-class Version20150527101600 extends AbstractMigrationChamilo
-{
-    /**
-     * @param Schema $schema
-     */
-    public function up(Schema $schema)
-    {
-        $this->addSettingCurrent(
-            'gamification_mode',
-            '',
-            'radio',
-            'Platform',
-            0,
-            'GamificationModeTitle',
-            'GamificationModeComment',
-            null,
-            '',
-            1,
-            true,
-            false,
-            [
-                [
-                    'value' => 1,
-                    'text' => 'Yes'
-                ],
-                [
-                    'value' => 0,
-                    'text' => 'No'
-                ]
-            ]
-        );
-    }
-
-    /**
-     * @param Schema $schema
-     */
-    public function down(Schema $schema)
-    {
-        $this->addSql("DELETE FROM settings_options WHERE variable = 'gamification_mode'");
-        $this->addSql("DELETE FROM settings_current WHERE variable = 'gamification_mode'");
-    }
-}

+ 0 - 33
app/Migrations/Schema/V110/Version20150527114220.php

@@ -1,33 +0,0 @@
-<?php
-/* For licensing terms, see /license.txt */
-
-namespace Application\Migrations\Schema\V110;
-
-use Application\Migrations\AbstractMigrationChamilo;
-use Doctrine\DBAL\Schema\Schema;
-
-/**
- * Class Version20150527114220
- * Lp category
- * @package Application\Migrations\Schema\V11010
- */
-class Version20150527114220 extends AbstractMigrationChamilo
-{
-    /**
-     * @param Schema $schema
-     */
-    public function up(Schema $schema)
-    {
-        $this->addSql('CREATE TABLE c_lp_category (iid INT AUTO_INCREMENT NOT NULL, c_id INT NOT NULL, name VARCHAR(255) NOT NULL, position INT NOT NULL, PRIMARY KEY(iid)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
-        $this->addSql('ALTER TABLE c_lp ADD category_id INT NOT NULL DEFAULT 0');
-    }
-
-    /**
-     * @param Schema $schema
-     */
-    public function down(Schema $schema)
-    {
-        $this->addSql('DROP TABLE c_lp_category');
-        $this->addSql('ALTER TABLE c_lp DROP category_id');
-    }
-}

+ 0 - 31
app/Migrations/Schema/V110/Version20150527120703.php

@@ -1,31 +0,0 @@
-<?php
-/* For licensing terms, see /license.txt */
-
-namespace Application\Migrations\Schema\V110;
-
-use Application\Migrations\AbstractMigrationChamilo;
-use Doctrine\DBAL\Schema\Schema;
-
-/**
- * Class Version20150527120703
- * LP autolunch -> autolaunch
- * @package Application\Migrations\Schema\V11010
- */
-class Version20150527120703 extends AbstractMigrationChamilo
-{
-    /**
-     * @param Schema $schema
-     */
-    public function up(Schema $schema)
-    {
-        $this->addSql('ALTER TABLE c_lp CHANGE COLUMN autolunch autolaunch INT NOT NULL DEFAULT 0');
-    }
-
-    /**
-     * @param Schema $schema
-     */
-    public function down(Schema $schema)
-    {
-        $this->addSql('ALTER TABLE c_lp CHANGE COLUMN autolaunch autolunch INT NOT NULL');
-    }
-}

+ 0 - 76
app/Migrations/Schema/V110/Version20150528103216.php

@@ -1,76 +0,0 @@
-<?php
-/* For licensing terms, see /license.txt */
-
-namespace Application\Migrations\Schema\V110;
-
-use Application\Migrations\AbstractMigrationChamilo;
-use Doctrine\DBAL\Schema\Schema;
-
-/**
- * Session date changes
- */
-class Version20150528103216 extends AbstractMigrationChamilo
-{
-    /**
-     * @param Schema $schema
-     */
-    public function up(Schema $schema)
-    {
-  	    $this->addSql('ALTER TABLE session ADD COLUMN access_start_date datetime');
-        $this->addSql('ALTER TABLE session ADD COLUMN access_end_date datetime');
-        $this->addSql('ALTER TABLE session ADD COLUMN coach_access_start_date datetime');
-        $this->addSql('ALTER TABLE session ADD COLUMN coach_access_end_date datetime');
-        $this->addSql('ALTER TABLE session ADD COLUMN display_start_date datetime');
-        $this->addSql('ALTER TABLE session ADD COLUMN display_end_date datetime');
-
-
-        $this->addSql('UPDATE session SET access_start_date = date_start');
-        $this->addSql("UPDATE session SET access_end_date = CONVERT(CONCAT(date_end, ' 23:59:59'), DATETIME)");
-
-        $this->addSql('UPDATE session SET coach_access_start_date = CONVERT(DATE_SUB(date_start, INTERVAL nb_days_access_before_beginning DAY), DATETIME) ');
-        $this->addSql('UPDATE session SET coach_access_start_date = NULL WHERE nb_days_access_before_beginning = 0');
-
-        $this->addSql('UPDATE session SET coach_access_end_date = CONVERT(DATE_ADD(date_end, INTERVAL nb_days_access_after_end DAY), DATETIME) ');
-        $this->addSql('UPDATE session SET coach_access_end_date = NULL WHERE nb_days_access_after_end = 0');
-
-        $this->addSql('UPDATE session SET display_start_date = access_start_date');
-        $this->addSql('UPDATE session SET display_end_date = access_end_date');
-
-        // Set dates to NULL
-
-        $this->addSql('UPDATE session SET access_start_date = NULL WHERE access_start_date = "0000-00-00 00:00:00"');
-        $this->addSql('UPDATE session SET access_end_date = NULL WHERE access_end_date = "0000-00-00 00:00:00"');
-
-        $this->addSql('UPDATE session SET coach_access_start_date = NULL WHERE coach_access_start_date = "0000-00-00 00:00:00"');
-        $this->addSql('UPDATE session SET coach_access_end_date = NULL WHERE coach_access_end_date = "0000-00-00 00:00:00"');
-
-        $this->addSql('UPDATE session SET display_start_date = NULL WHERE display_start_date = "0000-00-00 00:00:00"');
-        $this->addSql('UPDATE session SET display_end_date = NULL WHERE display_end_date = "0000-00-00 00:00:00"');
-    }
-
-    /**
-     * @param Schema $schema
-     */
-    public function down(Schema $schema)
-    {
-        $this->addSql('ALTER TABLE session CREATE date_start date NOT NULL');
-        $this->addSql('ALTER TABLE session CREATE date_end date NOT NULL');
-        $this->addSql('ALTER TABLE session CREATE nb_days_access_before_beginning TINYINT');
-        $this->addSql('ALTER TABLE session CREATE nb_days_access_after_end TINYINT');
-
-        $this->addSql('UPDATE session SET date_start = access_start_date');
-        $this->addSql('UPDATE session SET date_end = access_end_date');
-
-        $this->addSql('UPDATE session SET nb_days_access_before_beginning = DATEDIFF(access_start_date, coach_access_start_date) WHERE access_start_date != coach_access_start_date AND coach_access_start_date IS NOT NULL');
-        $this->addSql('UPDATE session SET nb_days_access_after_end = DATEDIFF(coach_access_end_date, coach_access_end_date) WHERE access_end_date != coach_access_end_date AND coach_access_end_date IS NOT NULL');
-        $this->addSql('UPDATE session SET nb_days_access_before_beginning = 0 WHERE access_start_date = coach_access_start_date OR coach_access_start_date IS NULL');
-        $this->addSql('UPDATE session SET nb_days_access_after_end = 0 WHERE access_end_date = coach_access_end_date OR coach_access_end_date IS NULL');
-
-        $this->addSql('ALTER TABLE session DROP access_start_date');
-        $this->addSql('ALTER TABLE session DROP access_end_date');
-        $this->addSql('ALTER TABLE session DROP coach_access_start_date');
-        $this->addSql('ALTER TABLE session DROP coach_access_end_date');
-        $this->addSql('ALTER TABLE session DROP display_start_date');
-        $this->addSql('ALTER TABLE session DROP display_end_date');
-    }
-}

+ 0 - 67
app/Migrations/Schema/V110/Version20150529164400.php

@@ -1,67 +0,0 @@
-<?php
-/* For licensing terms, see /license.txt */
-
-namespace Application\Migrations\Schema\V110;
-
-use Application\Migrations\AbstractMigrationChamilo;
-use Doctrine\DBAL\Schema\Schema;
-use Doctrine\DBAL\Types\Type as TableColumnType;
-
-/**
- * Session date changes
- */
-class Version20150529164400 extends AbstractMigrationChamilo
-{
-    /**
-     * @param Schema $schema
-     */
-    public function up(Schema $schema)
-    {
-        if (!$schema->hasTable('gradebook_score_log')) {
-            $gradebookScoreLog = $schema->createTable('gradebook_score_log');
-            $gradebookScoreLog->addColumn(
-                'id',
-                TableColumnType::INTEGER,
-                ['unsigned' => true, 'autoincrement' => true, 'notnull' => true]
-            );
-            $gradebookScoreLog->addColumn(
-                'category_id',
-                TableColumnType::INTEGER,
-                ['unsigned' => true, 'notnull' => true]
-            );
-            $gradebookScoreLog->addColumn(
-                'user_id',
-                TableColumnType::INTEGER,
-                ['unsigned' => true, 'notnull' => true]
-            );
-            $gradebookScoreLog->addColumn(
-                'score',
-                TableColumnType::FLOAT,
-                ['notnull' => true, 'scale' => 0, 'precision' => 10]
-            );
-            $gradebookScoreLog->addColumn(
-                'registered_at',
-                TableColumnType::DATETIME,
-                ['notnull' => true]
-            );
-            $gradebookScoreLog->setPrimaryKey(['id']);
-            $gradebookScoreLog->addIndex(
-                ['user_id'],
-                'idx_gradebook_score_log_user'
-            );
-            $gradebookScoreLog->addIndex(
-                ['user_id', 'category_id'],
-                'idx_gradebook_score_log_user_category'
-            );
-        }
-    }
-
-    /**
-     * @param Schema $schema
-     */
-    public function down(Schema $schema)
-    {
-        $schema->dropTable('gradebook_score_log');
-    }
-
-}

+ 0 - 70
app/Migrations/Schema/V110/Version20150603142550.php

@@ -1,70 +0,0 @@
-<?php
-/* For licensing terms, see /license.txt */
-
-namespace Application\Migrations\Schema\V110;
-
-use Application\Migrations\AbstractMigrationChamilo;
-use Doctrine\DBAL\Schema\Schema;
-
-/**
- * Add branch
- */
-class Version20150603142550 extends AbstractMigrationChamilo
-{
-    /**
-     * @param Schema $schema
-     */
-    public function preUp(Schema $schema)
-    {
-        $this->addSql("ALTER TABLE c_calendar_event ENGINE=InnoDB");
-        $this->addSql("ALTER TABLE c_thematic_advance ENGINE=InnoDB");
-    }
-
-    /**
-     * @param Schema $schema
-     */
-    public function up(Schema $schema)
-    {
-        $this->addSql('CREATE TABLE room (id INT AUTO_INCREMENT NOT NULL, branch_id INT DEFAULT NULL, title VARCHAR(255) DEFAULT NULL, description LONGTEXT, geolocation VARCHAR(255) DEFAULT NULL, ip VARCHAR(39) DEFAULT NULL, ip_mask VARCHAR(6) DEFAULT NULL, INDEX IDX_729F519BDCD6CC49 (branch_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
-        $this->addSql('CREATE TABLE branch_transaction_status (id INT AUTO_INCREMENT NOT NULL, title VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
-        $this->addSql('CREATE TABLE branch_transaction (id BIGINT AUTO_INCREMENT NOT NULL, status_id INT DEFAULT NULL, branch_id INT DEFAULT NULL, transaction_id BIGINT NOT NULL, action VARCHAR(20) DEFAULT NULL, item_id VARCHAR(255) DEFAULT NULL, origin VARCHAR(255) DEFAULT NULL, dest_id VARCHAR(255) DEFAULT NULL, external_info VARCHAR(255) DEFAULT NULL, time_insert DATETIME NOT NULL, time_update DATETIME NOT NULL, failed_attempts INT NOT NULL, INDEX IDX_FEFBA12B6BF700BD (status_id), INDEX IDX_FEFBA12BDCD6CC49 (branch_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
-        $this->addSql('CREATE TABLE branch_sync (id INT AUTO_INCREMENT NOT NULL, parent_id INT DEFAULT NULL, access_url_id INT NOT NULL, unique_id VARCHAR(50) NOT NULL, branch_name VARCHAR(250) NOT NULL, description LONGTEXT, branch_ip VARCHAR(40) DEFAULT NULL, latitude NUMERIC(10, 0) DEFAULT NULL, longitude NUMERIC(10, 0) DEFAULT NULL, dwn_speed INT DEFAULT NULL, up_speed INT DEFAULT NULL, delay INT DEFAULT NULL, admin_mail VARCHAR(250) DEFAULT NULL, admin_name VARCHAR(250) DEFAULT NULL, admin_phone VARCHAR(250) DEFAULT NULL, last_sync_trans_id BIGINT DEFAULT NULL, last_sync_trans_date DATETIME DEFAULT NULL, last_sync_type VARCHAR(20) DEFAULT NULL, ssl_pub_key VARCHAR(250) DEFAULT NULL, branch_type VARCHAR(250) DEFAULT NULL, lft INT DEFAULT NULL, rgt INT DEFAULT NULL, lvl INT DEFAULT NULL, root INT DEFAULT NULL, UNIQUE INDEX UNIQ_F62F45EDE3C68343 (unique_id), INDEX IDX_F62F45ED727ACA70 (parent_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
-        $this->addSql('ALTER TABLE room ADD CONSTRAINT FK_729F519BDCD6CC49 FOREIGN KEY (branch_id) REFERENCES branch_sync (id)');
-        $this->addSql('ALTER TABLE branch_transaction ADD CONSTRAINT FK_FEFBA12B6BF700BD FOREIGN KEY (status_id) REFERENCES branch_transaction_status (id)');
-        $this->addSql('ALTER TABLE branch_transaction ADD CONSTRAINT FK_FEFBA12BDCD6CC49 FOREIGN KEY (branch_id) REFERENCES branch_sync (id)');
-        $this->addSql('ALTER TABLE branch_sync ADD CONSTRAINT FK_F62F45ED727ACA70 FOREIGN KEY (parent_id) REFERENCES branch_sync (id) ON DELETE SET NULL');
-        $this->addSql('ALTER TABLE course ADD room_id INT DEFAULT NULL');
-        $this->addSql('ALTER TABLE course ADD CONSTRAINT FK_169E6FB954177093 FOREIGN KEY (room_id) REFERENCES room (id)');
-        $this->addSql('CREATE INDEX IDX_169E6FB954177093 ON course (room_id)');
-        $this->addSql('ALTER TABLE c_calendar_event ADD room_id INT DEFAULT NULL');
-        $this->addSql('ALTER TABLE c_calendar_event ADD CONSTRAINT FK_A062258154177093 FOREIGN KEY (room_id) REFERENCES room (id)');
-        $this->addSql('CREATE INDEX IDX_A062258154177093 ON c_calendar_event (room_id)');
-        $this->addSql('ALTER TABLE c_thematic_advance ADD room_id INT DEFAULT NULL');
-        $this->addSql('ALTER TABLE c_thematic_advance ADD CONSTRAINT FK_62798E9754177093 FOREIGN KEY (room_id) REFERENCES room (id)');
-        $this->addSql('CREATE INDEX IDX_62798E9754177093 ON c_thematic_advance (room_id)');
-    }
-
-    /**
-     * @param Schema $schema
-     */
-    public function down(Schema $schema)
-    {
-        $this->addSql('ALTER TABLE course DROP FOREIGN KEY FK_169E6FB954177093');
-        $this->addSql('ALTER TABLE c_calendar_event DROP FOREIGN KEY FK_A062258154177093');
-        $this->addSql('ALTER TABLE c_thematic_advance DROP FOREIGN KEY FK_62798E9754177093');
-        $this->addSql('ALTER TABLE branch_transaction DROP FOREIGN KEY FK_FEFBA12B6BF700BD');
-        $this->addSql('ALTER TABLE room DROP FOREIGN KEY FK_729F519BDCD6CC49');
-        $this->addSql('ALTER TABLE branch_transaction DROP FOREIGN KEY FK_FEFBA12BDCD6CC49');
-        $this->addSql('ALTER TABLE branch_sync DROP FOREIGN KEY FK_F62F45ED727ACA70');
-        $this->addSql('DROP TABLE room');
-        $this->addSql('DROP TABLE branch_transaction_status');
-        $this->addSql('DROP TABLE branch_transaction');
-        $this->addSql('DROP TABLE branch_sync');
-        $this->addSql('DROP INDEX IDX_A062258154177093 ON c_calendar_event');
-        $this->addSql('ALTER TABLE c_calendar_event DROP room_id');
-        $this->addSql('DROP INDEX IDX_62798E9754177093 ON c_thematic_advance');
-        $this->addSql('ALTER TABLE c_thematic_advance DROP room_id');
-        $this->addSql('DROP INDEX IDX_169E6FB954177093 ON course');
-        $this->addSql('ALTER TABLE course DROP room_id');
-    }
-}

+ 0 - 32
app/Migrations/Schema/V110/Version20150603151200.php

@@ -1,32 +0,0 @@
-<?php
-/* For licensing terms, see /license.txt */
-
-namespace Application\Migrations\Schema\V110;
-
-use Application\Migrations\AbstractMigrationChamilo;
-use Doctrine\DBAL\Schema\Schema;
-
-/**
- * Session date changes
- */
-class Version20150603151200 extends AbstractMigrationChamilo
-{
-    /**
-     * @param Schema $schema
-     */
-    public function up(Schema $schema)
-    {
-        $this->addSql('ALTER TABLE c_forum_forum ADD lp_id INTEGER UNSIGNED NOT NULL');
-        $this->addSql('ALTER TABLE c_forum_thread ADD lp_item_id INTEGER UNSIGNED NOT NULL');
-    }
-
-    /**
-     * @param Schema $schema
-     */
-    public function down(Schema $schema)
-    {
-        $this->addSql('ALTER TABLE c_forum_forum DROP lp_id');
-        $this->addSql('ALTER TABLE c_forum_thread DROP lp_item_id');
-    }
-
-}

+ 0 - 101
app/Migrations/Schema/V110/Version20150603181728.php

@@ -1,101 +0,0 @@
-<?php
-/* For licensing terms, see /license.txt */
-
-namespace Application\Migrations\Schema\V110;
-
-use Application\Migrations\AbstractMigrationChamilo;
-use Doctrine\DBAL\Schema\Schema;
-
-/**
- * Lp changes
- */
-class Version20150603181728 extends AbstractMigrationChamilo
-{
-    /**
-     * @param Schema $schema
-     */
-    public function preUp(Schema $schema)
-    {
-        $this->addSql("ALTER TABLE course ENGINE=InnoDB");
-        $this->addSql("ALTER TABLE c_group_info ENGINE=InnoDB");
-        $this->addSql("ALTER TABLE session ENGINE=InnoDB");
-        $this->addSql("ALTER TABLE user ENGINE=InnoDB");
-        $this->addSql("ALTER TABLE c_item_property ENGINE=InnoDB");
-    }
-
-    /**
-     * @param Schema $schema
-     */
-    public function up(Schema $schema)
-    {
-        $table = $schema->getTable('c_lp');
-        if (!$table->hasColumn('max_attempts')) {
-            $this->addSql('ALTER TABLE c_lp ADD max_attempts INT NOT NULL');
-
-        }
-
-        if (!$table->hasColumn('subscribe_users')) {
-            $this->addSql('ALTER TABLE c_lp ADD subscribe_users INT NOT NULL DEFAULT 0');
-        }
-
-        $this->addSql('
-            ALTER TABLE c_item_property
-            MODIFY c_id INT DEFAULT NULL,
-            MODIFY lastedit_user_id INT NOT NULL,
-            MODIFY to_group_id INT NULL,
-            MODIFY insert_user_id INT DEFAULT NULL,
-            MODIFY start_visible DATETIME DEFAULT NULL,
-            MODIFY end_visible DATETIME DEFAULT NULL,
-            MODIFY session_id INT DEFAULT NULL,
-            MODIFY to_user_id INT NULL
-        ');
-        $this->addSql("UPDATE c_item_property SET session_id = NULL WHERE session_id = 0");
-        $this->addSql("UPDATE c_item_property SET to_group_id = NULL WHERE to_group_id = 0");
-        $this->addSql("UPDATE c_item_property SET to_user_id = NULL WHERE to_user_id = 0");
-        $this->addSql("UPDATE c_item_property SET start_visible = NULL WHERE start_visible = '0000-00-00 00:00:00'");
-        $this->addSql("UPDATE c_item_property SET end_visible = NULL WHERE end_visible = '0000-00-00 00:00:00'");
-        $this->addSql("UPDATE c_item_property SET to_user_id = NULL WHERE to_user_id NOT IN (SELECT id FROM user)");
-        $this->addSql("UPDATE c_item_property SET insert_user_id = NULL WHERE insert_user_id NOT IN (SELECT id FROM user)");
-        $this->addSql("UPDATE c_item_property SET session_id = NULL WHERE session_id NOT IN (SELECT id FROM session)");
-
-        // Remove inconsistencies about non-existing courses
-        $this->addSql("DELETE FROM c_item_property WHERE c_id = 0");
-        // Remove inconsistencies about non-existing users
-        $this->addSql("DELETE FROM course_rel_user WHERE user_id = 0");
-
-        $this->addSql("DELETE FROM c_item_property WHERE c_id NOT IN (SELECT id FROM course)");
-        $this->addSql("DELETE FROM c_item_property WHERE to_group_id NOT IN (SELECT id FROM c_group_info)");
-
-        $this->addSql('UPDATE c_item_property cip SET cip.to_group_id = (SELECT cgi.iid FROM c_group_info cgi WHERE cgi.c_id = cip.c_id AND cgi.id = cip.to_group_id)');
-
-        $this->addSql('ALTER TABLE c_item_property ADD CONSTRAINT FK_1D84C18191D79BD3 FOREIGN KEY (c_id) REFERENCES course(id)');
-        $this->addSql('ALTER TABLE c_item_property ADD CONSTRAINT FK_1D84C181330D47E9 FOREIGN KEY (to_group_id) REFERENCES c_group_info (iid)');
-        $this->addSql('ALTER TABLE c_item_property ADD CONSTRAINT FK_1D84C18129F6EE60 FOREIGN KEY (to_user_id) REFERENCES user (id)');
-        $this->addSql('ALTER TABLE c_item_property ADD CONSTRAINT FK_1D84C1819C859CC3 FOREIGN KEY (insert_user_id) REFERENCES user (id)');
-        $this->addSql('ALTER TABLE c_item_property ADD CONSTRAINT FK_1D84C181613FECDF FOREIGN KEY (session_id) REFERENCES session (id)');
-        $this->addSql('CREATE INDEX IDX_1D84C18191D79BD3 ON c_item_property (c_id)');
-        $this->addSql('CREATE INDEX IDX_1D84C181330D47E9 ON c_item_property (to_group_id)');
-        $this->addSql('CREATE INDEX IDX_1D84C18129F6EE60 ON c_item_property (to_user_id)');
-        $this->addSql('CREATE INDEX IDX_1D84C1819C859CC3 ON c_item_property (insert_user_id)');
-        $this->addSql('CREATE INDEX IDX_1D84C181613FECDF ON c_item_property (session_id)');
-    }
-
-    /**
-     * @param Schema $schema
-     */
-    public function down(Schema $schema)
-    {
-        $this->addSql('ALTER TABLE c_lp DROP max_attempts, DROP subscribe_users');
-        $this->addSql('ALTER TABLE c_item_property DROP FOREIGN KEY FK_1D84C18191D79BD3');
-        $this->addSql('ALTER TABLE c_item_property DROP FOREIGN KEY FK_1D84C181330D47E9');
-        $this->addSql('ALTER TABLE c_item_property DROP FOREIGN KEY FK_1D84C18129F6EE60');
-        $this->addSql('ALTER TABLE c_item_property DROP FOREIGN KEY FK_1D84C1819C859CC3');
-        $this->addSql('ALTER TABLE c_item_property DROP FOREIGN KEY FK_1D84C181613FECDF');
-        $this->addSql('DROP INDEX IDX_1D84C18191D79BD3 ON c_item_property');
-        $this->addSql('DROP INDEX IDX_1D84C181330D47E9 ON c_item_property');
-        $this->addSql('DROP INDEX IDX_1D84C18129F6EE60 ON c_item_property');
-        $this->addSql('DROP INDEX IDX_1D84C1819C859CC3 ON c_item_property');
-        $this->addSql('DROP INDEX IDX_1D84C181613FECDF ON c_item_property');
-        $this->addSql('ALTER TABLE c_item_property CHANGE c_id c_id INT NOT NULL, CHANGE insert_user_id insert_user_id INT NOT NULL, CHANGE session_id session_id INT NOT NULL, CHANGE start_visible start_visible DATETIME NOT NULL, CHANGE end_visible end_visible DATETIME NOT NULL');
-    }
-}

+ 0 - 29
app/Migrations/Schema/V110/Version20150604145047.php

@@ -1,29 +0,0 @@
-<?php
-/* For licensing terms, see /license.txt */
-
-namespace Application\Migrations\Schema\V110;
-
-use Application\Migrations\AbstractMigrationChamilo;
-use Doctrine\DBAL\Schema\Schema;
-
-/**
- * track_e_default changes
- */
-class Version20150604145047 extends AbstractMigrationChamilo
-{
-    /**
-     * @param Schema $schema
-     */
-    public function up(Schema $schema)
-    {
-        $this->addSql('ALTER TABLE track_e_default CHANGE default_event_type default_event_type VARCHAR(255) NOT NULL, CHANGE default_value_type default_value_type VARCHAR(255) NOT NULL');
-    }
-
-    /**
-     * @param Schema $schema
-     */
-    public function down(Schema $schema)
-    {
-        $this->addSql('ALTER TABLE track_e_default CHANGE default_event_type default_event_type VARCHAR(20) NOT NULL COLLATE utf8_unicode_ci, CHANGE default_value_type default_value_type VARCHAR(20) NOT NULL COLLATE utf8_unicode_ci');
-    }
-}

+ 0 - 70
app/Migrations/Schema/V110/Version20150608104600.php

@@ -1,70 +0,0 @@
-<?php
-/* For licensing terms, see /license.txt */
-
-namespace Application\Migrations\Schema\V110;
-
-use Application\Migrations\AbstractMigrationChamilo;
-use Doctrine\DBAL\Schema\Schema;
-use Doctrine\DBAL\Types\Type as TableColumnType;
-
-/**
- * Session date changes
- */
-class Version20150608104600 extends AbstractMigrationChamilo
-{
-    /**
-     * @param Schema $schema
-     */
-    public function up(Schema $schema)
-    {
-        if (!$schema->hasTable('extra_field_rel_tag')) {
-            $extraFieldRelTag = $schema->createTable('extra_field_rel_tag');
-            $extraFieldRelTag->addColumn(
-                'id',
-                TableColumnType::INTEGER,
-                ['unsigned' => true, 'autoincrement' => true, 'notnull' => true]
-            );
-            $extraFieldRelTag->addColumn(
-                'field_id',
-                TableColumnType::INTEGER,
-                ['unsigned' => true, 'notnull' => true]
-            );
-            $extraFieldRelTag->addColumn(
-                'item_id',
-                TableColumnType::INTEGER,
-                ['unsigned' => true, 'notnull' => true]
-            );
-            $extraFieldRelTag->addColumn(
-                'tag_id',
-                TableColumnType::INTEGER,
-                ['unsigned' => true, 'notnull' => true]
-            );
-            $extraFieldRelTag->setPrimaryKey(['id']);
-            $extraFieldRelTag->addIndex(
-                ['field_id'],
-                'idx_frt_field'
-            );
-            $extraFieldRelTag->addIndex(
-                ['item_id'],
-                'idx_frt_item'
-            );
-            $extraFieldRelTag->addIndex(
-                ['tag_id'],
-                'idx_frt_tag'
-            );
-            $extraFieldRelTag->addIndex(
-                ['field_id', 'item_id', 'tag_id'],
-                'idx_frt_field_item_tag'
-            );
-        }
-    }
-
-    /**
-     * @param Schema $schema
-     */
-    public function down(Schema $schema)
-    {
-        $schema->dropTable('extra_field_rel_tag');
-    }
-
-}

+ 0 - 35
app/Migrations/Schema/V110/Version20150609113500.php

@@ -1,35 +0,0 @@
-<?php
-/* For licensing terms, see /license.txt */
-
-namespace Application\Migrations\Schema\V110;
-
-use Application\Migrations\AbstractMigrationChamilo;
-use Doctrine\DBAL\Schema\Schema;
-
-/**
- * Session date changes
- */
-class Version20150609113500 extends AbstractMigrationChamilo
-{
-    /**
-     * @param Schema $schema
-     */
-    public function up(Schema $schema)
-    {
-        $this->addSql("INSERT INTO extra_field
-            (extra_field_type, field_type, variable, display_text, visible, changeable, created_at)
-            VALUES (2, 10, 'tags', 'Tags', 1, 1, NOW())");
-    }
-
-    /**
-     * @param Schema $schema
-     */
-    public function down(Schema $schema)
-    {
-        $this->addSql("DELETE FROM extra_field
-            WHERE variable = 'tags' AND
-                extra_field_type = 2 AND
-                field_type = 10");
-    }
-
-}

+ 0 - 29
app/Migrations/Schema/V110/Version20150610143426.php

@@ -1,29 +0,0 @@
-<?php
-/* For licensing terms, see /license.txt */
-
-namespace Application\Migrations\Schema\V110;
-
-use Application\Migrations\AbstractMigrationChamilo;
-use Doctrine\DBAL\Schema\Schema;
-
-/**
- * Tool changes
- */
-class Version20150610143426 extends AbstractMigrationChamilo
-{
-    /**
-     * @param Schema $schema
-     */
-    public function up(Schema $schema)
-    {
-        $this->addSql('ALTER TABLE c_tool ADD description LONGTEXT, ADD custom_icon VARCHAR(255) DEFAULT NULL');
-    }
-
-    /**
-     * @param Schema $schema
-     */
-    public function down(Schema $schema)
-    {
-        $this->addSql('ALTER TABLE c_tool DROP description, DROP custom_icon');
-    }
-}

+ 0 - 34
app/Migrations/Schema/V110/Version20150615171900.php

@@ -1,34 +0,0 @@
-<?php
-/* For licensing terms, see /license.txt */
-
-namespace Application\Migrations\Schema\V110;
-
-use Application\Migrations\AbstractMigrationChamilo;
-use Doctrine\DBAL\Schema\Schema;
-
-/**
- * Version20150615171900 class
- * Change in CCourseDescription entity
- *
- * @author Angel Fernando Quiroz Campos <angel.quiroz@beeznest.com>
- */
-class Version20150615171900 extends AbstractMigrationChamilo
-{
-
-    /**
-     * @param Schema $schema
-     */
-    public function up(Schema $schema)
-    {
-        $this->addSql('ALTER TABLE c_course_description CHANGE description_type description_type INTEGER NOT NULL DEFAULT 1');
-    }
-
-    /**
-     * @param Schema $schema
-     */
-    public function down(Schema $schema)
-    {
-        $this->addSql('ALTER TABLE c_course_description CHANGE description_type description_type BOOLEAN NOT NULL');
-    }
-
-}

+ 0 - 35
app/Migrations/Schema/V110/Version20150616093200.php

@@ -1,35 +0,0 @@
-<?php
-/* For licensing terms, see /license.txt */
-
-namespace Application\Migrations\Schema\V110;
-
-use Application\Migrations\AbstractMigrationChamilo;
-use Doctrine\DBAL\Schema\Schema;
-
-/**
- * Session date changes
- */
-class Version20150616093200 extends AbstractMigrationChamilo
-{
-    /**
-     * @param Schema $schema
-     */
-    public function up(Schema $schema)
-    {
-        $this->addSql("INSERT INTO extra_field (
-            extra_field_type, field_type, variable, display_text, visible, changeable, created_at)
-            VALUES (2, 19, 'video_url', 'VideoUrl', 1, 1, NOW())");
-    }
-
-    /**
-     * @param Schema $schema
-     */
-    public function down(Schema $schema)
-    {
-        $this->addSql("DELETE FROM extra_field
-            WHERE variable = 'video_url' AND
-                extra_field_type = 2 AND
-                field_type = 19");
-    }
-
-}

+ 0 - 35
app/Migrations/Schema/V110/Version20150624164100.php

@@ -1,35 +0,0 @@
-<?php
-/* For licensing terms, see /license.txt */
-
-namespace Application\Migrations\Schema\V110;
-
-use Application\Migrations\AbstractMigrationChamilo;
-use Doctrine\DBAL\Schema\Schema;
-
-/**
- * Session date changes
- */
-class Version20150624164100 extends AbstractMigrationChamilo
-{
-    /**
-     * @param Schema $schema
-     */
-    public function up(Schema $schema)
-    {
-        $this->addSql("INSERT INTO extra_field
-            (extra_field_type, field_type, variable, display_text, visible, changeable, created_at)
-            VALUES (3, 16, 'image', 'Image', 1, 1, NOW())");
-    }
-
-    /**
-     * @param Schema $schema
-     */
-    public function down(Schema $schema)
-    {
-        $this->addSql("DELETE FROM extra_field
-            WHERE variable = 'image' AND
-                extra_field_type = 3 AND
-                field_type = 16");
-    }
-
-}

+ 0 - 35
app/Migrations/Schema/V110/Version20150625155000.php

@@ -1,35 +0,0 @@
-<?php
-/* For licensing terms, see /license.txt */
-
-namespace Application\Migrations\Schema\V110;
-
-use Application\Migrations\AbstractMigrationChamilo;
-use Doctrine\DBAL\Schema\Schema;
-
-/**
- * Session date changes
- */
-class Version20150625155000 extends AbstractMigrationChamilo
-{
-    /**
-     * @param Schema $schema
-     */
-    public function up(Schema $schema)
-    {
-        $this->addSql("INSERT INTO extra_field
-            (extra_field_type, field_type, variable, display_text, visible, changeable, created_at)
-            VALUES (1, 1, 'captcha_blocked_until_date', 'Account locked until', 0, 0, NOW())");
-    }
-
-    /**
-     * @param Schema $schema
-     */
-    public function down(Schema $schema)
-    {
-        $this->addSql("DELETE FROM extra_field
-            WHERE variable = 'captcha_blocked_until_date' AND
-                extra_field_type = 1 AND
-                field_type = 1");
-    }
-
-}

+ 0 - 36
app/Migrations/Schema/V110/Version20150706135000.php

@@ -1,36 +0,0 @@
-<?php
-/* For licensing terms, see /license.txt */
-
-namespace Application\Migrations\Schema\V110;
-
-use Application\Migrations\AbstractMigrationChamilo;
-use Doctrine\DBAL\Schema\Schema;
-
-/**
- * GradebookCategory changes
- */
-class Version20150706135000 extends AbstractMigrationChamilo
-{
-    /**
-     * @param Schema $schema
-     */
-    public function up(Schema $schema)
-    {
-        $gradebookCategory = $schema->getTable('gradebook_category');
-
-        $isRequirement = $gradebookCategory->addColumn(
-            'is_requirement',
-            \Doctrine\DBAL\Types\Type::BOOLEAN
-        );
-        $isRequirement->setNotnull(true)->setDefault(false);
-    }
-
-    /**
-     * @param Schema $schema
-     */
-    public function down(Schema $schema)
-    {
-        $gradebookCategory = $schema->getTable('gradebook_category');
-        $gradebookCategory->dropColumn('is_requirement');
-    }
-}

+ 0 - 29
app/Migrations/Schema/V110/Version20150709083710.php

@@ -1,29 +0,0 @@
-<?php
-/* For licensing terms, see /license.txt */
-
-namespace Application\Migrations\Schema\V110;
-
-use Application\Migrations\AbstractMigrationChamilo;
-use Doctrine\DBAL\Schema\Schema;
-
-/**
- * Agenda
- */
-class Version20150709083710 extends AbstractMigrationChamilo
-{
-    /**
-     * @param Schema $schema
-     */
-    public function up(Schema $schema)
-    {
-        $this->addSql('ALTER TABLE c_calendar_event ADD color VARCHAR(100) DEFAULT NULL');
-    }
-
-    /**
-     * @param Schema $schema
-     */
-    public function down(Schema $schema)
-    {
-        $this->addSql('ALTER TABLE c_calendar_event DROP color');
-    }
-}

+ 0 - 35
app/Migrations/Schema/V110/Version20150713132630.php

@@ -1,35 +0,0 @@
-<?php
-/* For licensing terms, see /license.txt */
-
-namespace Application\Migrations\Schema\V110;
-
-use Application\Migrations\AbstractMigrationChamilo;
-use Doctrine\DBAL\Schema\Schema;
-
-/**
- * Class Version20150713132630
- *
- * @package Application\Migrations\Schema\V11010
- */
-class Version20150713132630 extends AbstractMigrationChamilo
-{
-    /**
-     * @param Schema $schema
-     */
-    public function up(Schema $schema)
-    {
-        if ($schema->hasTable('c_student_publication')) {
-            $this->addSql('ALTER TABLE c_student_publication ADD url_correction VARCHAR(255) DEFAULT NULL');
-            $this->addSql('ALTER TABLE c_student_publication ADD title_correction VARCHAR(255) DEFAULT NULL');
-        }
-    }
-
-    /**
-     * @param Schema $schema
-     */
-    public function down(Schema $schema)
-    {
-        $this->addSql('ALTER TABLE c_student_publication DROP url_correction');
-        $this->addSql('ALTER TABLE c_student_publication DROP title_correction');
-    }
-}

+ 0 - 111
app/Migrations/Schema/V110/Version20150803163400.php

@@ -1,111 +0,0 @@
-<?php
-/* For licensing terms, see /license.txt */
-
-namespace Application\Migrations\Schema\V110;
-
-use Application\Migrations\AbstractMigrationChamilo;
-use Doctrine\DBAL\Schema\Schema;
-
-/**
- * Class Version20150803163400
- *
- * @package Application\Migrations\Schema\V110
- */
-class Version20150803163400 extends AbstractMigrationChamilo
-{
-    /**
-     * @param Schema $schema
-     */
-    public function up(Schema $schema)
-    {
-        $this->addSettingCurrent(
-            'cron_remind_course_expiration_activate',
-            null,
-            'radio',
-            'Crons',
-            'false',
-            'CronRemindCourseExpirationActivateTitle',
-            'CronRemindCourseExpirationActivateComment',
-            null,
-            null,
-            1,
-            true,
-            false,
-            [
-                0 => ['value' => 'true', 'text' => 'Yes'],
-                1 => ['value' => 'false', 'text' => 'No']
-            ]
-        );
-
-        $this->addSettingCurrent(
-            'cron_remind_course_expiration_frequency',
-            null,
-            'textfield',
-            'Crons',
-            '2',
-            'CronRemindCourseExpirationFrecuenqyTitle',
-            'CronRemindCourseExpirationFrecuenqyComment',
-            null,
-            null,
-            1,
-            true,
-            false
-        );
-
-        $this->addSettingCurrent(
-            'cron_course_finished_activate',
-            null,
-            'radio',
-            'Crons',
-            'false',
-            'CronCourseFinishedActivateTitle',
-            'CronCourseFinishedActivateComment',
-            null,
-            null,
-            1,
-            true,
-            false,
-            [
-                0 => ['value' => 'true', 'text' => 'Yes'],
-                1 => ['value' => 'false', 'text' => 'No']
-            ]
-        );
-    }
-
-    /**
-     * @param Schema $schema
-     */
-    public function down(Schema $schema)
-    {
-        $entityManage = $this->getEntityManager();
-
-        $deleteOptions = $entityManage->createQueryBuilder();
-
-        $deleteOptions->delete('ChamiloCoreBundle:SettingsOptions', 'o')
-            ->andWhere(
-                $deleteOptions->expr()->in(
-                    'o.variable',
-                    [
-                        'cron_remind_course_expiration_activate',
-                        'cron_course_finished_activate'
-                    ]
-                )
-            );
-        $deleteOptions->getQuery()->execute();
-
-        $deleteSettings = $entityManage->createQueryBuilder();
-        $deleteSettings->delete('ChamiloCoreBundle:SettingsCurrent', 's')
-            ->andWhere(
-                $deleteSettings->expr()->in(
-                    's.variable',
-                    [
-                        'cron_remind_course_expiration_activate',
-                        'cron_remind_course_expiration_frequency',
-                        'cron_course_finished_activate'
-                    ]
-                )
-            );
-        $deleteSettings->getQuery()->execute();
-    }
-
-}

+ 0 - 37
app/Migrations/Schema/V110/Version20150803171220.php

@@ -1,37 +0,0 @@
-<?php
-/* For licensing terms, see /license.txt */
-
-namespace Application\Migrations\Schema\V110;
-
-use Application\Migrations\AbstractMigrationChamilo;
-use Doctrine\DBAL\Schema\Schema;
-
-/**
- * Class Version20150803171220
- *
- * @package Application\Migrations\Schema\V110
- */
-class Version20150803171220 extends AbstractMigrationChamilo
-{
-    /**
-     * @param Schema $schema
-     */
-    public function up(Schema $schema)
-    {
-        $this->addSql('UPDATE user SET username_canonical = username');
-        $this->addSql('ALTER TABLE user ADD confirmation_token VARCHAR(255) NULL');
-        $this->addSql('ALTER TABLE user ADD password_requested_at DATETIME DEFAULT NULL');
-        $this->addSql('RENAME TABLE track_e_exercices TO track_e_exercises');
-        // This drops the old table
-        // $schema->renameTable('track_e_exercices', 'track_e_exercises');
-    }
-
-    /**
-     * @param Schema $schema
-     */
-    public function down(Schema $schema)
-    {
-        $this->addSql('ALTER TABLE user DROP confirmation_token');
-        $this->addSql('ALTER TABLE user DROP password_requested_at');
-    }
-}

+ 0 - 40
app/Migrations/Schema/V110/Version20150805161000.php

@@ -1,40 +0,0 @@
-<?php
-/* For licensing terms, see /license.txt */
-
-namespace Application\Migrations\Schema\V110;
-
-use Application\Migrations\AbstractMigrationChamilo;
-use Doctrine\DBAL\Schema\Schema;
-
-/**
- * Class Version20150713132630
- *
- * @package Application\Migrations\Schema\V11010
- */
-class Version20150805161000 extends AbstractMigrationChamilo
-{
-
-    /**
-     * @param Schema $schema
-     */
-    public function up(Schema $schema)
-    {
-        $sessionTable = $schema->getTable('session');
-
-        $sessionTable->addColumn(
-            'send_subscription_notification',
-            \Doctrine\DBAL\Types\Type::BOOLEAN,
-            ['default' => false]
-        );
-    }
-
-    /**
-     * @param Schema $schema
-     */
-    public function down(Schema $schema)
-    {
-        $sessionTable = $schema->getTable('session');
-        $sessionTable->dropColumn('send_subscription_notification');
-    }
-
-}

+ 0 - 29
app/Migrations/Schema/V110/Version20150810132615.php

@@ -1,29 +0,0 @@
-<?php
-/* For licensing terms, see /license.txt */
-
-namespace Application\Migrations\Schema\V110;
-
-use Application\Migrations\AbstractMigrationChamilo;
-use Doctrine\DBAL\Schema\Schema;
-
-/**
- * Calendar color
- */
-class Version20150810132615 extends AbstractMigrationChamilo
-{
-    /**
-     * @param Schema $schema
-     */
-    public function up(Schema $schema)
-    {
-        $this->addSql('ALTER TABLE personal_agenda ADD color VARCHAR(255) DEFAULT NULL');
-    }
-
-    /**
-     * @param Schema $schema
-     */
-    public function down(Schema $schema)
-    {
-        $this->addSql('ALTER TABLE personal_agenda DROP color');
-    }
-}

+ 0 - 75
app/Migrations/Schema/V110/Version20150812230500.php

@@ -1,75 +0,0 @@
-<?php
-/* For licensing terms, see /license.txt */
-
-namespace Application\Migrations\Schema\V110;
-
-use Application\Migrations\AbstractMigrationChamilo;
-use Doctrine\DBAL\Schema\Schema;
-
-/**
- * Class Version20150812230500
- *
- * @package Application\Migrations\Schema\V11010
- */
-class Version20150812230500 extends AbstractMigrationChamilo
-{
-
-    /**
-     * @param Schema $schema
-     */
-    public function up(Schema $schema)
-    {
-        $this->addSettingCurrent(
-            'allow_coach_feedback_exercises',
-            null,
-            'radio',
-            'Session',
-            'false',
-            'AllowCoachFeedbackExercisesTitle',
-            'AllowCoachFeedbackExercisesComment',
-            null,
-            null,
-            1,
-            true,
-            false,
-            [
-                ['value' => 'true', 'text' => 'Yes'],
-                ['value' => 'false', 'text' => 'No']
-            ]
-        );
-    }
-
-    /**
-     * @param Schema $schema
-     */
-    public function down(Schema $schema)
-    {
-        $entityManage = $this->getEntityManager();
-
-        $deleteOptions = $entityManage->createQueryBuilder();
-
-        $deleteOptions->delete('ChamiloCoreBundle:SettingsOptions', 'o')
-            ->andWhere(
-                $deleteOptions->expr()->in(
-                    'o.variable',
-                    [
-                        'allow_coach_feedback_exercises'
-                    ]
-                )
-            );
-        $deleteOptions->getQuery()->execute();
-
-        $deleteSettings = $entityManage->createQueryBuilder();
-        $deleteSettings->delete('ChamiloCoreBundle:SettingsCurrent', 's')
-            ->andWhere(
-                $deleteSettings->expr()->in(
-                    's.variable',
-                    [
-                        'allow_coach_feedback_exercises'
-                    ]
-                )
-            );
-        $deleteSettings->getQuery()->execute();
-    }
-
-}

+ 0 - 166
app/Migrations/Schema/V110/Version20150813143000.php

@@ -1,166 +0,0 @@
-<?php
-/* For licensing terms, see /license.txt */
-
-namespace Application\Migrations\Schema\V110;
-
-use Application\Migrations\AbstractMigrationChamilo;
-use Doctrine\DBAL\Schema\Schema;
-
-/**
- * Calendar color
- */
-class Version20150813143000 extends AbstractMigrationChamilo
-{
-    /**
-     * @param Schema $schema
-     */
-    public function up(Schema $schema)
-    {
-        $this->addSettingCurrent(
-            'prevent_multiple_simultaneous_login',
-            null,
-            'radio',
-            'Security',
-            'false',
-            'PreventMultipleSimultaneousLoginTitle',
-            'PreventMultipleSimultaneousLoginComment',
-            null,
-            null,
-            1,
-            false,
-            true,
-            [
-                0 => ['value' => 'true', 'text' => 'Yes'],
-                1 => ['value' => 'false', 'text' => 'No']
-            ]
-        );
-        $this->addSettingCurrent(
-            'gradebook_detailed_admin_view',
-            null,
-            'radio',
-            'Gradebook',
-            'false',
-            'ShowAdditionalColumnsInStudentResultsPageTitle',
-            'ShowAdditionalColumnsInStudentResultsPageComment',
-            null,
-            null,
-            1,
-            true,
-            false,
-            [
-                0 => ['value' => 'true', 'text' => 'Yes'],
-                1 => ['value' => 'false', 'text' => 'No']
-            ]
-        );
-        $this->addSettingCurrent(
-            'course_catalog_published',
-            null,
-            'radio',
-            'Course',
-            'false',
-            'CourseCatalogIsPublicTitle',
-            'CourseCatalogIsPublicComment',
-            null,
-            null,
-            1,
-            false,
-            true,
-            [
-                0 => ['value' => 'true', 'text' => 'Yes'],
-                1 => ['value' => 'false', 'text' => 'No']
-            ]
-        );
-        $this->addSettingCurrent(
-            'user_reset_password',
-            null,
-            'radio',
-            'Security',
-            'false',
-            'ResetPasswordTokenTitle',
-            'ResetPasswordTokenComment',
-            null,
-            null,
-            1,
-            false,
-            true,
-            [
-                0 => ['value' => 'true', 'text' => 'Yes'],
-                1 => ['value' => 'false', 'text' => 'No']
-            ]
-        );
-        $this->addSettingCurrent(
-            'user_reset_password_token_limit',
-            null,
-            'textfield',
-            'Security',
-            '3600',
-            'ResetPasswordTokenLimitTitle',
-            'ResetPasswordTokenLimitComment',
-            null,
-            null,
-            1,
-            false,
-            true
-        );
-        $this->addSettingCurrent(
-            'my_courses_view_by_session',
-            null,
-            'radio',
-            'Session',
-            'false',
-            'ViewMyCoursesListBySessionTitle',
-            'ViewMyCoursesListBySessionComment',
-            null,
-            null,
-            1,
-            true,
-            false,
-            [
-                0 => ['value' => 'true', 'text' => 'Yes'],
-                1 => ['value' => 'false', 'text' => 'No']
-            ]
-        );
-    }
-
-    /**
-     * @param Schema $schema
-     */
-    public function down(Schema $schema)
-    {
-        $entityManage = $this->getEntityManager();
-
-        $deleteOptions = $entityManage->createQueryBuilder();
-        $deleteSettings = $entityManage->createQueryBuilder();
-
-        $deleteOptions->delete('ChamiloCoreBundle:SettingsOptions', 'o')
-            ->andWhere(
-                $deleteOptions->expr()->in(
-                    'o.variable',
-                    [
-                        'prevent_multiple_simultaneous_login',
-                        'gradebook_detailed_admin_view',
-                        'course_catalog_published',
-                        'user_reset_password',
-                        'user_reset_password_token_limit',
-                        'my_courses_view_by_session'
-                    ]
-                )
-            );
-        $deleteOptions->getQuery()->execute();
-
-        $deleteSettings->delete('ChamiloCoreBundle:SettingsCurrent', 's')
-            ->andWhere(
-                $deleteSettings->expr()->in(
-                    's.variable',
-                    [
-                        'prevent_multiple_simultaneous_login',
-                        'gradebook_detailed_admin_view',
-                        'course_catalog_published',
-                        'user_reset_password',
-                        'my_courses_view_by_session'
-                    ]
-                )
-            );
-        $deleteSettings->getQuery()->execute();
-    }
-}

+ 0 - 71
app/Migrations/Schema/V110/Version20150813200000.php

@@ -1,71 +0,0 @@
-<?php
-/* For licensing terms, see /license.txt */
-
-namespace Application\Migrations\Schema\V110;
-
-use Application\Migrations\AbstractMigrationChamilo;
-use Doctrine\DBAL\Schema\Schema;
-
-/**
- * Calendar color
- */
-class Version20150813200000 extends AbstractMigrationChamilo
-{
-    /**
-     * @param Schema $schema
-     */
-    public function up(Schema $schema)
-    {
-        $entityManage = $this->getEntityManager();
-
-        $deleteOptions = $entityManage->createQueryBuilder();
-        $deleteSettings = $entityManage->createQueryBuilder();
-
-        $deleteOptions->delete('ChamiloCoreBundle:SettingsOptions', 'o')
-            ->andWhere(
-                $deleteOptions->expr()->in(
-                    'o.variable',
-                    [
-                        'math_mimetex'
-                    ]
-                )
-            );
-        $deleteOptions->getQuery()->execute();
-
-        $deleteSettings->delete('ChamiloCoreBundle:SettingsCurrent', 's')
-            ->andWhere(
-                $deleteSettings->expr()->in(
-                    's.variable',
-                    [
-                        'math_mimetex'
-                    ]
-                )
-            );
-        $deleteSettings->getQuery()->execute();
-    }
-
-    /**
-     * @param Schema $schema
-     */
-    public function down(Schema $schema)
-    {
-        $this->addSettingCurrent(
-            'math_mimetex',
-            null,
-            'radio',
-            'Editor',
-            'false',
-            'MathMimetexTitle',
-            'MathMimetexComment',
-            null,
-            null,
-            1,
-            false,
-            true,
-            [
-                0 => ['value' => 'true', 'text' => 'Yes'],
-                1 => ['value' => 'false', 'text' => 'No']
-            ]
-        );
-    }
-}

+ 0 - 45
app/Migrations/Schema/V110/Version20150819095300.php

@@ -1,45 +0,0 @@
-<?php
-/* For licensing terms, see /license.txt */
-
-namespace Application\Migrations\Schema\V110;
-
-use Application\Migrations\AbstractMigrationChamilo;
-use Doctrine\DBAL\Schema\Schema;
-
-/**
- * Class Version20150819095300
- *
- * @package Application\Migrations\Schema\V11010
- */
-class Version20150819095300 extends AbstractMigrationChamilo
-{
-
-    /**
-     * @param Schema $schema
-     */
-    public function up(Schema $schema)
-    {
-        $skillTable = $schema->getTable('skill');
-
-        $skillTable->addColumn(
-            'status',
-            \Doctrine\DBAL\Types\Type::INTEGER,
-            ['default' => 1]
-        );
-        $skillTable->addColumn(
-            'updated_at',
-            \Doctrine\DBAL\Types\Type::DATETIME
-        );
-    }
-
-    /**
-     * @param Schema $schema
-     */
-    public function down(Schema $schema)
-    {
-        $skillTable = $schema->getTable('skill');
-        $skillTable->dropColumn('status');
-        $skillTable->dropColumn('updated_at');
-    }
-
-}

+ 0 - 178
app/Migrations/Schema/V110/Version20150821150000.php

@@ -1,178 +0,0 @@
-<?php
-/* For licensing terms, see /license.txt */
-
-namespace Application\Migrations\Schema\V110;
-
-use Application\Migrations\AbstractMigrationChamilo;
-use Doctrine\DBAL\Schema\Schema;
-
-/**
- * Class Version20150821150000
- *
- * @package Application\Migrations\Schema\V11010
- */
-class Version20150821150000 extends AbstractMigrationChamilo
-{
-
-    /**
-     * @param Schema $schema
-     */
-    public function up(Schema $schema)
-    {
-        $entityManage = $this->getEntityManager();
-
-        $deleteOptions = $entityManage->createQueryBuilder();
-        $deleteSettings = $entityManage->createQueryBuilder();
-
-        $deleteOptions->delete('ChamiloCoreBundle:SettingsOptions', 'o')
-            ->andWhere(
-                $deleteOptions->expr()->in(
-                    'o.variable',
-                    [
-                        'display_mini_month_calendar'
-                    ]
-                )
-            );
-        $deleteOptions->getQuery()->execute();
-
-        $deleteSettings->delete('ChamiloCoreBundle:SettingsCurrent', 's')
-            ->andWhere(
-                $deleteSettings->expr()->in(
-                    's.variable',
-                    [
-                        'display_mini_month_calendar'
-                    ]
-                )
-            );
-        $deleteSettings->getQuery()->execute();
-        $deleteOptions->delete('ChamiloCoreBundle:SettingsOptions', 'o')
-            ->andWhere(
-                $deleteOptions->expr()->in(
-                    'o.variable',
-                    [
-                        'display_upcoming_events'
-                    ]
-                )
-            );
-        $deleteOptions->getQuery()->execute();
-
-        $deleteSettings->delete('ChamiloCoreBundle:SettingsCurrent', 's')
-            ->andWhere(
-                $deleteSettings->expr()->in(
-                    's.variable',
-                    [
-                        'display_upcoming_events'
-                    ]
-                )
-            );
-        $deleteSettings->getQuery()->execute();
-        $deleteSettings->delete('ChamiloCoreBundle:SettingsCurrent', 's')
-            ->andWhere(
-                $deleteSettings->expr()->in(
-                    's.variable',
-                    [
-                        'number_of_upcoming_events'
-                    ]
-                )
-            );
-        $deleteSettings->getQuery()->execute();
-
-        $deleteOptions->delete('ChamiloCoreBundle:SettingsOptions', 'o')
-            ->andWhere(
-                $deleteOptions->expr()->in(
-                    'o.variable',
-                    [
-                        'allow_reservation'
-                    ]
-                )
-            );
-        $deleteOptions->getQuery()->execute();
-
-        $deleteSettings->delete('ChamiloCoreBundle:SettingsCurrent', 's')
-            ->andWhere(
-                $deleteSettings->expr()->in(
-                    's.variable',
-                    [
-                        'allow_reservation'
-                    ]
-                )
-            );
-        $deleteSettings->getQuery()->execute();
-    }
-
-    /**
-     * @param Schema $schema
-     */
-    public function down(Schema $schema)
-    {
-        $this->addSettingCurrent(
-            'display_mini_month_calendar',
-            null,
-            'radio',
-            'Tools',
-            'true',
-            'DisplayMiniMonthCalendarTitle',
-            'DisplayMiniMonthCalendarComment',
-            null,
-            null,
-            1,
-            false,
-            false,
-            [
-                0 => ['value' => 'true', 'text' => 'Yes'],
-                1 => ['value' => 'false', 'text' => 'No']
-            ]
-        );
-        $this->addSettingCurrent(
-            'display_upcoming_events',
-            null,
-            'radio',
-            'Tools',
-            'true',
-            'DisplayUpcomingEventsTitle',
-            'DisplayUpcomingEventsComment',
-            null,
-            null,
-            1,
-            false,
-            false,
-            [
-                0 => ['value' => 'true', 'text' => 'Yes'],
-                1 => ['value' => 'false', 'text' => 'No']
-            ]
-        );
-        $this->addSettingCurrent(
-            'number_of_upcoming_events',
-            null,
-            'textfield',
-            'Tools',
-            '1',
-            'NumberOfUpcomingEventsTitle',
-            'NumberOfUpcomingEventsComment',
-            null,
-            null,
-            1,
-            false,
-            false
-        );
-        $this->addSettingCurrent(
-            'allow_reservation',
-            null,
-            'radio',
-            'Tools',
-            'false',
-            'AllowReservationTitle',
-            'AllowReservationComment',
-            null,
-            null,
-            1,
-            true,
-            false,
-            [
-                0 => ['value' => 'true', 'text' => 'Yes'],
-                1 => ['value' => 'false', 'text' => 'No']
-            ]
-        );
-    }
-
-}

+ 0 - 67
app/Migrations/Schema/V110/Version20150825141100.php

@@ -1,67 +0,0 @@
-<?php
-/* For licensing terms, see /license.txt */
-
-namespace Application\Migrations\Schema\V110;
-
-use Application\Migrations\AbstractMigrationChamilo;
-use Doctrine\DBAL\Schema\Schema;
-
-/**
- * Calendar color
- */
-class Version20150825141100 extends AbstractMigrationChamilo
-{
-    /**
-     * @param Schema $schema
-     */
-    public function up(Schema $schema)
-    {
-        $this->addSettingCurrent(
-            'show_full_skill_name_on_skill_wheel',
-            null,
-            'radio',
-            'Platform',
-            'false',
-            'ShowFullSkillNameOnSkillWheelTitle',
-            'ShowFullSkillNameOnSkillWheelComment',
-            null,
-            null,
-            1,
-            false,
-            true,
-            [
-                ['value' => 'true', 'text' => 'Yes'],
-                ['value' => 'false', 'text' => 'No']
-            ]
-        );
-    }
-
-    /**
-     * @param Schema $schema
-     */
-    public function down(Schema $schema)
-    {
-        $entityManage = $this->getEntityManager();
-
-        $deleteOptions = $entityManage->createQueryBuilder();
-        $deleteSettings = $entityManage->createQueryBuilder();
-
-        $deleteOptions->delete('ChamiloCoreBundle:SettingsOptions', 'o')
-            ->andWhere(
-                $deleteOptions->expr()->in(
-                    'o.variable',
-                    ['show_full_skill_name_on_skill_wheel']
-                )
-            );
-        $deleteOptions->getQuery()->execute();
-
-        $deleteSettings->delete('ChamiloCoreBundle:SettingsCurrent', 's')
-            ->andWhere(
-                $deleteSettings->expr()->in(
-                    's.variable',
-                    ['show_full_skill_name_on_skill_wheel']
-                )
-            );
-        $deleteSettings->getQuery()->execute();
-    }
-}

+ 0 - 41
app/Migrations/Schema/V110/Version20151101082200.php

@@ -1,41 +0,0 @@
-<?php
-/* For licensing terms, see /license.txt */
-
-namespace Application\Migrations\Schema\V110;
-
-use Application\Migrations\AbstractMigrationChamilo;
-use Doctrine\DBAL\Schema\Schema;
-
-/**
- * Calendar color
- */
-class Version20151101082200 extends AbstractMigrationChamilo
-{
-    /**
-     * @param Schema $schema
-     */
-    public function up(Schema $schema)
-    {
-        $this->addSql("ALTER TABLE access_url ENGINE=InnoDB");
-        $this->addSql("ALTER TABLE access_url_rel_course ENGINE=InnoDB");
-        $this->addSql("ALTER TABLE course_rel_user ENGINE=InnoDB");
-        $this->addSql("ALTER TABLE session_category ENGINE=InnoDB");
-        $this->addSql("ALTER TABLE settings_current ENGINE=InnoDB");
-        $this->addSql("ALTER TABLE settings_options ENGINE=InnoDB");
-        $this->addSql("ALTER TABLE usergroup ENGINE=InnoDB");
-        $this->addSql("ALTER TABLE usergroup_rel_user ENGINE=InnoDB");
-
-        $this->addSql("ALTER TABLE session_rel_course DROP PRIMARY KEY");
-        $this->addSql("ALTER TABLE session_rel_course_rel_user DROP PRIMARY KEY");
-        $this->addSql("ALTER TABLE session MODIFY session_category_id INT NULL");
-
-        $this->addSql("UPDATE session SET session_category_id = NULL WHERE session_category_id = 0");
-    }
-
-    /**
-     * @param Schema $schema
-     */
-    public function down(Schema $schema)
-    {
-    }
-}

+ 0 - 299
app/Migrations/Schema/V110/Version20151101082300.php

@@ -1,299 +0,0 @@
-<?php
-/* For licensing terms, see /license.txt */
-
-namespace Application\Migrations\Schema\V110;
-
-use Application\Migrations\AbstractMigrationChamilo;
-use Doctrine\DBAL\Schema\Schema;
-use Doctrine\DBAL\Types\Type;
-
-/**
- * Calendar color
- */
-class Version20151101082300 extends AbstractMigrationChamilo
-{
-    /**
-     * @param Schema $schema
-     */
-    public function up(Schema $schema)
-    {
-        $accessUrl = $schema->getTable('access_url');
-        $accessUrl->getColumn('id')->setUnsigned(false);
-
-        $accessUrlRelCourse = $schema->getTable('access_url_rel_course');
-        $accessUrlRelCourse->getColumn('access_url_id')->setUnsigned(false);
-        $accessUrlRelCourse->addForeignKeyConstraint('access_url', ['access_url_id'], ['id']);
-        $accessUrlRelCourse->addForeignKeyConstraint('course', ['c_id'], ['id']);
-
-        $schema->renameTable('class', 'class_item');
-
-        $classUser = $schema->getTable('class_user');
-        $classUser->getColumn('class_id')->setUnsigned(false);
-        $classUser->getColumn('user_id')->setUnsigned(false);
-
-        $course = $schema->getTable('course');
-        $course->getColumn('course_type_id')->setUnsigned(false);
-        $course->addForeignKeyConstraint('room', ['room_id'], ['id']);
-
-        $courseRelClass = $schema->getTable('course_rel_class');
-        $courseRelClass->getColumn('class_id')->setUnsigned(false)->setType(Type::getType(Type::INTEGER));
-
-        $courseRelUser = $schema->getTable('course_rel_user');
-        $courseRelUser->addForeignKeyConstraint('course', ['c_id'], ['id']);
-        $courseRelUser->addForeignKeyConstraint('user', ['user_id'], ['id']);
-
-        $courseType = $schema->getTable('course_type');
-        $courseType->getColumn('id')->setUnsigned(false);
-
-        $schema->getTable('c_announcement')->addIndex(['c_id']);
-        $schema->getTable('c_announcement_attachment')->addIndex(['c_id']);
-        $schema->getTable('c_attendance')->addIndex(['c_id']);
-        $schema->getTable('c_attendance_calendar')->addIndex(['c_id']);
-
-        $cAttendanceCalendarRelGroup = $schema->getTable('c_attendance_calendar_rel_group');
-        $cAttendanceCalendarRelGroup->addIndex(['c_id']);
-        $cAttendanceCalendarRelGroup->addIndex(['group_id']);
-
-        $schema->getTable('c_attendance_result')->addIndex(['c_id']);
-
-        $cAttendanceSheet = $schema->getTable('c_attendance_sheet');
-        $cAttendanceSheet->addIndex(['c_id']);
-        $cAttendanceSheet->addIndex(['user_id']);
-
-        $schema->getTable('c_attendance_sheet_log')->addIndex(['c_id']);
-        $schema->getTable('c_blog')->addIndex(['c_id']);
-        $schema->getTable('c_blog_attachment')->addIndex(['c_id']);
-        $schema->getTable('c_blog_comment')->addIndex(['c_id']);
-        $schema->getTable('c_blog_post')->addIndex(['c_id']);
-        $schema->getTable('c_blog_rating')->addIndex(['c_id']);
-
-        $cBlogRelUser = $schema->getTable('c_blog_rel_user');
-        $cBlogRelUser->getColumn('blog_id')->setUnsigned(false);
-        $cBlogRelUser->getColumn('user_id')->setUnsigned(false);
-        $cBlogRelUser->addIndex(['c_id']);
-
-        $schema->getTable('c_blog_task')->addIndex(['c_id']);
-
-        $cBlogTaskRelUser = $schema->getTable('c_blog_task_rel_user');
-        $cBlogTaskRelUser->getColumn('blog_id')->setUnsigned(false);
-        $cBlogTaskRelUser->getColumn('user_id')->setUnsigned(false);
-        $cBlogTaskRelUser->getColumn('task_id')->setUnsigned(false);
-        $cBlogTaskRelUser->addIndex(['c_id']);
-        $cBlogTaskRelUser->addIndex(['user_id']);
-        $cBlogTaskRelUser->addIndex(['task_id']);
-
-        $cCalendarEvent = $schema->getTable('c_calendar_event');
-        $cCalendarEvent->addIndex(['c_id']);
-
-        $schema->getTable('c_calendar_event_attachment')->addIndex(['c_id']);
-        $schema->getTable('c_calendar_event_repeat')->addIndex(['c_id']);
-        $schema->getTable('c_calendar_event_repeat_not')->addIndex(['c_id']);
-
-        $cChatConnected = $schema->getTable('c_chat_connected');
-        $cChatConnected->addIndex(['c_id']);
-        $cChatConnected->addIndex(['user_id']);
-
-        $schema->getTable('c_course_setting')->addIndex(['c_id']);
-        $schema->getTable('c_document')->addIndex(['c_id']);
-        $schema->getTable('c_dropbox_category')->addIndex(['c_id']);
-        $schema->getTable('c_dropbox_feedback')->addIndex(['c_id']);
-        $schema->getTable('c_dropbox_file')->addIndex(['c_id']);
-
-        $cDropboxPerson = $schema->getTable('c_dropbox_person');
-        $cDropboxPerson->addIndex(['c_id']);
-        $cDropboxPerson->addIndex(['user_id']);
-
-        $cDropboxPost = $schema->getTable('c_dropbox_post');
-        $cDropboxPost->addIndex(['c_id']);
-        $cDropboxPost->addIndex(['dest_user_id']);
-
-        $schema->getTable('c_forum_attachment')->addIndex(['c_id']);
-        $schema->getTable('c_forum_category')->addIndex(['c_id']);
-        $schema->getTable('c_forum_forum')->addIndex(['c_id']);
-
-        $cForumMailcue = $schema->getTable('c_forum_mailcue');
-        $cForumMailcue->addIndex(['c_id']);
-        $cForumMailcue->addIndex(['thread_id']);
-        $cForumMailcue->addIndex(['user_id']);
-        $cForumMailcue->addIndex(['post_id']);
-
-        $cForumNotification = $schema->getTable('c_forum_notification');
-        $cForumNotification->addIndex(['c_id']);
-        $cForumNotification->addIndex(['thread_id']);
-        $cForumNotification->addIndex(['post_id']);
-
-        $schema->getTable('c_forum_post')->addIndex(['c_id']);
-        $schema->getTable('c_forum_thread')->addIndex(['c_id']);
-        $schema->getTable('c_forum_thread_qualify')->addIndex(['c_id']);
-        $schema->getTable('c_forum_thread_qualify_log')->addIndex(['c_id']);
-        $schema->getTable('c_glossary')->addIndex(['c_id']);
-        $schema->getTable('c_group_category')->addIndex(['c_id']);
-        $schema->getTable('c_group_info')->addIndex(['c_id']);
-        $schema->getTable('c_group_rel_tutor')->addIndex(['c_id']);
-
-        $schema->getTable('c_group_rel_user')->addIndex(['c_id']);
-        $schema->getTable('c_link')->addIndex(['c_id']);
-        $schema->getTable('c_link_category')->addIndex(['c_id']);
-        $schema->getTable('c_lp')->addIndex(['c_id']);
-        $schema->getTable('c_lp_category')->addIndex(['c_id']);
-        $schema->getTable('c_lp_item')->addIndex(['c_id']);
-        $schema->getTable('c_lp_item_view')->addIndex(['c_id']);
-        $schema->getTable('c_lp_iv_interaction')->addIndex(['c_id']);
-        $schema->getTable('c_lp_iv_objective')->addIndex(['c_id']);
-        $schema->getTable('c_lp_view')->addIndex(['c_id']);
-        $schema->getTable('c_notebook')->addIndex(['c_id']);
-        $schema->getTable('c_online_connected')->addIndex(['c_id']);
-        $schema->getTable('c_online_link')->addIndex(['c_id']);
-        $schema->getTable('c_permission_group')->addIndex(['c_id']);
-        $schema->getTable('c_permission_task')->addIndex(['c_id']);
-        $schema->getTable('c_permission_user')->addIndex(['c_id']);
-        $schema->getTable('c_quiz')->addIndex(['c_id']);
-        $schema->getTable('c_quiz_answer')->addIndex(['c_id']);
-        $schema->getTable('c_quiz_question')->addIndex(['c_id']);
-        $schema->getTable('c_quiz_question_category')->addIndex(['c_id']);
-        $schema->getTable('c_quiz_question_option')->addIndex(['c_id']);
-        $schema->getTable('c_quiz_question_rel_category')->addIndex(['c_id']);
-
-        $cQuizRelQuestion = $schema->getTable('c_quiz_rel_question');
-        $cQuizRelQuestion->addIndex(['c_id']);
-        $cQuizRelQuestion->addIndex(['question_id']);
-        $cQuizRelQuestion->addIndex(['exercice_id']);
-
-        $schema->getTable('c_resource')->addIndex(['c_id']);
-
-        $schema->getTable('c_role')->addIndex(['c_id']);
-
-        $cRoleGroup = $schema->getTable('c_role_group');
-        $cRoleGroup->addIndex(['c_id']);
-        $cRoleGroup->addIndex(['group_id']);
-
-        $cRolePermissions = $schema->getTable('c_role_permissions');
-        $cRolePermissions->addIndex(['c_id']);
-        $cRolePermissions->addIndex(['role_id']);
-
-        $cRoleUser = $schema->getTable('c_role_user');
-        $cRoleUser->addIndex(['c_id']);
-        $cRoleUser->addIndex(['user_id']);
-
-        $schema->getTable('c_student_publication')->addIndex(['c_id']);
-        $schema->getTable('c_student_publication_assignment')->addIndex(['c_id']);
-
-        $cStudentPublicationComment = $schema->getTable('c_student_publication_comment');
-        $cStudentPublicationComment->addIndex(['c_id']);
-        $cStudentPublicationComment->addIndex(['user_id']);
-        $cStudentPublicationComment->addIndex(['work_id']);
-
-        $cStudentPublicationComment = $schema->getTable('c_student_publication_rel_document');
-        $cStudentPublicationComment->addIndex(['c_id']);
-        $cStudentPublicationComment->addIndex(['work_id']);
-        $cStudentPublicationComment->addIndex(['document_id']);
-
-        $cStudentPublicationComment = $schema->getTable('c_student_publication_rel_user');
-        $cStudentPublicationComment->addIndex(['c_id']);
-        $cStudentPublicationComment->addIndex(['work_id']);
-        $cStudentPublicationComment->addIndex(['user_id']);
-
-        $schema->getTable('c_survey')->addIndex(['c_id']);
-        $schema->getTable('c_survey_answer')->addIndex(['c_id']);
-        $schema->getTable('c_survey_group')->addIndex(['c_id']);
-        $schema->getTable('c_survey_invitation')->addIndex(['c_id']);
-        $schema->getTable('c_survey_question')->addIndex(['c_id']);
-        $schema->getTable('c_survey_question_option')->addIndex(['c_id']);
-        $schema->getTable('c_thematic')->addIndex(['c_id']);
-        $schema->getTable('c_thematic_advance')->addIndex(['c_id']);
-        $schema->getTable('c_thematic_plan')->addIndex(['c_id']);
-        $schema->getTable('c_tool')->addIndex(['c_id']);
-        $schema->getTable('c_tool_intro')->addIndex(['c_id']);
-        $schema->getTable('c_userinfo_content')->addIndex(['c_id']);
-        $schema->getTable('c_userinfo_def')->addIndex(['c_id']);
-        $schema->getTable('c_wiki')->addIndex(['c_id']);
-        $schema->getTable('c_wiki_conf')->addIndex(['c_id']);
-        $schema->getTable('c_wiki_discuss')->addIndex(['c_id']);
-
-        $cWikiMailcue = $schema->getTable('c_wiki_mailcue');
-        $cWikiMailcue->addIndex(['c_id']);
-        $cWikiMailcue->addIndex(['user_id']);
-
-        $schema->getTable('extra_field_values')->addForeignKeyConstraint('extra_field', ['field_id'], ['id']);
-
-        $session = $schema->getTable('session');
-        $session->getColumn('id_coach')->setUnsigned(false);
-        $session->addIndex(['session_category_id']);
-        $session->addIndex(['id_coach']);
-        $session->addForeignKeyConstraint('session_category', ['session_category_id'], ['id']);
-        $session->addForeignKeyConstraint('user', ['id_coach'], ['id']);
-
-        $sessionCategory = $schema->getTable('session_category');
-        $sessionCategory->addIndex(['access_url_id']);
-        $sessionCategory->addForeignKeyConstraint('access_url', ['access_url_id'], ['id']);
-
-        $sessionRelCourse = $schema->getTable('session_rel_course');
-        $sessionRelCourse->dropColumn('course_code');
-        $sessionRelCourse->addColumn('id', Type::INTEGER)->setAutoincrement(true);
-        $sessionRelCourse->getColumn('c_id')->setUnsigned(false);
-        $sessionRelCourse->setPrimaryKey(['id']);
-        $sessionRelCourse->addIndex(['c_id']);
-        $sessionRelCourse->addIndex(['session_id']);
-        $sessionRelCourse->addForeignKeyConstraint('course', ['c_id'], ['id']);
-        $sessionRelCourse->addForeignKeyConstraint('session', ['session_id'], ['id']);
-
-        $sessionRelCourseRelUser = $schema->getTable('session_rel_course_rel_user');
-        $sessionRelCourseRelUser->dropColumn('course_code');
-        $sessionRelCourseRelUser->addColumn('id', Type::INTEGER)->setAutoincrement(true);
-        $sessionRelCourseRelUser->getColumn('c_id')->setUnsigned(false);
-        $sessionRelCourseRelUser->setPrimaryKey(['id']);
-        $sessionRelCourseRelUser->addIndex(['c_id']);
-        $sessionRelCourseRelUser->addIndex(['session_id']);
-        $sessionRelCourseRelUser->addForeignKeyConstraint('course', ['c_id'], ['id']);
-        $sessionRelCourseRelUser->addForeignKeyConstraint('session', ['session_id'], ['id']);
-        $sessionRelCourseRelUser->addForeignKeyConstraint('user', ['user_id'], ['id']);
-
-        $sessionRelUser = $schema->getTable('session_rel_user');
-        $sessionRelUser->addColumn('moved_to', Type::INTEGER)->setNotnull(false);
-        $sessionRelUser->addColumn('moved_status', Type::INTEGER)->setNotnull(false);
-        $sessionRelUser->addColumn('moved_at', Type::DATETIME)->setNotnull(false);
-
-        $sessionRelUser->addIndex(['session_id']);
-        $sessionRelUser->addIndex(['user_id']);
-        $sessionRelUser->addIndex(['user_id', 'moved_to']);
-        $sessionRelUser->addForeignKeyConstraint('user', ['user_id'], ['id']);
-        $sessionRelUser->addForeignKeyConstraint('session', ['session_id'], ['id']);
-
-        $settingsCurrent = $schema->getTable('settings_current');
-        $settingsCurrent->addUniqueIndex(['variable', 'subkey', 'access_url']);
-
-        $settingsCurrent = $schema->getTable('settings_options');
-        $settingsCurrent->dropIndex('id');
-        $settingsCurrent->addUniqueIndex(['variable', 'value']);
-
-        $schema->getTable('track_e_access')->addIndex(['c_id']);
-        $schema->getTable('track_e_attempt')->addIndex(['c_id']);
-        $schema->getTable('track_e_course_access')->addIndex(['c_id']);
-
-        $trackEDefault = $schema->getTable('track_e_default');
-        $trackEDefault->addIndex(['c_id']);
-        $trackEDefault->addIndex(['session_id']);
-
-        $schema->getTable('track_e_downloads')->addIndex(['c_id']);
-        $schema->getTable('track_e_exercises')->addIndex(['c_id']);
-        $schema->getTable('track_e_hotpotatoes')->addIndex(['c_id']);
-        $schema->getTable('track_e_lastaccess')->addIndex(['c_id']);
-        $schema->getTable('track_e_links')->addIndex(['c_id']);
-        $schema->getTable('track_e_online')->addIndex(['c_id']);
-        $schema->getTable('track_e_uploads')->addIndex(['c_id']);
-        $schema->getTable('user')->addUniqueIndex(['username_canonical']);
-
-        $usergroupRelUSer = $schema->getTable('usergroup_rel_user');
-        $usergroupRelUSer->addIndex(['user_id']);
-        $usergroupRelUSer->addIndex(['usergroup_id']);
-        $usergroupRelUSer->addForeignKeyConstraint('usergroup', ['usergroup_id'], ['id']);
-        $usergroupRelUSer->addForeignKeyConstraint('user', ['user_id'], ['id']);
-    }
-
-    /**
-     * @param Schema $schema
-     */
-    public function down(Schema $schema)
-    {
-    }
-}

+ 0 - 34
app/Migrations/Schema/V110/Version20151119082400.php

@@ -1,34 +0,0 @@
-<?php
-/* For licensing terms, see /license.txt */
-
-namespace Application\Migrations\Schema\V110;
-
-use Application\Migrations\AbstractMigrationChamilo;
-use Doctrine\DBAL\Schema\Schema;
-use Doctrine\DBAL\Types\Type;
-
-/**
- * Add new indexes
- */
-class Version20151119082400 extends AbstractMigrationChamilo
-{
-    /**
-     * @param Schema $schema
-     */
-    public function up(Schema $schema)
-    {
-        $user = $schema->getTable('user');
-        $user->addIndex(['user_id']);
-
-        $userRelTag = $schema->getTable('user_rel_tag');
-        $userRelTag->addIndex(['user_id']);
-        $userRelTag->addIndex(['tag_id']);
-    }
-
-    /**
-     * @param Schema $schema
-     */
-    public function down(Schema $schema)
-    {
-    }
-}

+ 0 - 32
app/Migrations/Schema/V110/Version20151214164000.php

@@ -1,32 +0,0 @@
-<?php
-/* For licensing terms, see /license.txt */
-
-namespace Application\Migrations\Schema\V110;
-
-use Application\Migrations\AbstractMigrationChamilo;
-use Doctrine\DBAL\Schema\Schema;
-
-/**
- * Add indexes
- */
-class Version20151214164000 extends AbstractMigrationChamilo
-{
-    /**
-     * @param Schema $schema
-     */
-    public function up(Schema $schema)
-    {
-        $extraFieldValueTable = $schema->getTable('extra_field_values');
-        $extraFieldValueTable->addIndex(['field_id', 'item_id']);
-
-        $extraFieldTable = $schema->getTable('extra_field');
-        $extraFieldTable->addIndex(['extra_field_type']);
-    }
-
-    /**
-     * @param Schema $schema
-     */
-    public function down(Schema $schema)
-    {
-    }
-}

+ 0 - 129
app/Migrations/Schema/V110/Version20151214170800.php

@@ -1,129 +0,0 @@
-<?php
-/* For licensing terms, see /license.txt */
-
-namespace Application\Migrations\Schema\V110;
-
-use Application\Migrations\AbstractMigrationChamilo;
-use Doctrine\DBAL\Schema\Schema;
-use Doctrine\DBAL\Types\Type;
-
-/**
- * Fix track_e_hotspot table and migrate hotspot/values
- * In the wake of an issue with the hotspot code not being possible to update without moving from AS2 to AS3 (Flash), we
- * have decided to rewrite the hotspot tool in JS.
- * Little did we know that we would find out that the coordinates system in use by the Flash version of hotspot was in
- * fact a projection into a square form of 360x360, not depending on the original size of the image, and that a square
- * was defined by its center's coordinates and its width, with an initial not-null margin on the left and top borders.
- * The migration below fixes those parallax issues.
- */
-class Version20151214170800 extends AbstractMigrationChamilo
-{
-    /**
-     * @param Schema $schema
-     */
-    public function up(Schema $schema)
-    {
-        $this->addSql("ALTER TABLE track_e_hotspot ADD c_id INT NULL");
-        $this->addSql("ALTER TABLE track_e_hotspot MODIFY COLUMN hotspot_coordinate LONGTEXT NOT NULL");
-        $this->addSql("UPDATE track_e_hotspot SET c_id = (SELECT id FROM course WHERE code = hotspot_course_code)");
-
-        $answers = $this->connection->fetchAll("
-            SELECT a.iid, a.c_id, a.question_id, a.hotspot_coordinates, a.hotspot_type, q.picture, c.directory
-            FROM c_quiz_answer a
-            INNER JOIN c_quiz_question q
-                ON a.question_id = q.id
-            INNER JOIN course c
-                ON (a.c_id = c.id AND q.c_id = c.id)
-            WHERE a.hotspot_type IN ('square', 'circle', 'poly', 'delineation', 'oar')
-        ");
-
-        foreach ($answers as $answer) {
-            // Recover the real image size to recalculate coordinates
-            $imagePath = api_get_path(SYS_PATH) . "courses/{$answer['directory']}/document/images/{$answer['picture']}";
-            $imageSize = getimagesize($imagePath);
-            $widthRatio = $imageSize[0] / 360;
-            $heightRatio = $imageSize[1] / 360;
-            $oldCoords = $answer['hotspot_coordinates'];
-            $oldPairedString = explode('|', $oldCoords);
-            $newPairedString = [];
-
-            switch ($answer['hotspot_type']) {
-                case 'square':
-                    $oldCenter = explode(';', $oldPairedString[0]);
-
-                    $oldCenterX = intval($oldCenter[0]);
-                    $oldCenterY = intval($oldCenter[1]);
-                    $oldWidth = intval($oldPairedString[1]);
-                    $oldHeight = intval($oldPairedString[2]);
-
-                    $newX = floor(($oldCenterX - $oldWidth / 2) * $widthRatio) + ceil($widthRatio);
-                    $newY = floor(($oldCenterY - $oldHeight / 2) * $heightRatio) + ceil($heightRatio);
-                    $newWidth = ceil($oldWidth * $widthRatio) + ceil(1 * $heightRatio);
-                    $newHeight = ceil($oldHeight * $heightRatio) + floor(1 * $heightRatio);
-
-                    $newPairedString[] = implode(';', [$newX, $newY]);
-                    $newPairedString[] = $newWidth;
-                    $newPairedString[] = $newHeight;
-                    break;
-
-                case 'circle':
-                    $oldCenter = explode(';', $oldPairedString[0]);
-
-                    $oldCenterX = intval($oldCenter[0]);
-                    $oldCenterY = intval($oldCenter[1]);
-                    $oldRadiusX = intval($oldPairedString[1]) / 2;
-                    $oldRadiusY = intval($oldPairedString[2]) / 2;
-
-                    $newCenterX = floor($oldCenterX * $widthRatio) + ceil($widthRatio);
-                    $newCenterY = floor($oldCenterY * $heightRatio) + ceil($heightRatio);
-                    $newRadiusX = floor($oldRadiusX * $widthRatio);
-                    $newRadiusY = floor($oldRadiusY * $heightRatio);
-
-                    $newPairedString[] = implode(';', [$newCenterX, $newCenterY]);
-                    $newPairedString[] = $newRadiusX;
-                    $newPairedString[] = $newRadiusY;
-                    break;
-
-                case 'poly':
-                    //no break;
-                case 'delineation':
-                    //no break
-                case 'oar':
-                    $paired = [];
-
-                    foreach ($oldPairedString as $pairString) {
-                        $pair = explode(';', $pairString);
-                        $x = isset($pair[0]) ? intval($pair[0]) : 0;
-                        $y = isset($pair[1]) ? intval($pair[1]) : 0;
-
-                        $paired[] = [$x, $y];
-                    }
-
-                    foreach ($paired as $pair) {
-                        $x = floor($pair[0] * $widthRatio) + ceil($widthRatio);
-                        $y = ceil($pair[1] * $heightRatio);
-
-                        $newPairedString[] = implode(';', [$x, $y]);
-                    }
-                    break;
-            }
-
-            $stmt = $this->connection->prepare("
-                UPDATE c_quiz_answer
-                SET hotspot_coordinates = :coordinates
-                WHERE iid = :iid AND c_id = :cid
-            ");
-            $stmt->bindValue('coordinates', implode('|', $newPairedString), Type::TEXT);
-            $stmt->bindValue('iid', $answer['iid'], Type::INTEGER);
-            $stmt->bindValue('cid', $answer['c_id'], Type::INTEGER);
-            $stmt->execute();
-        }
-    }
-
-    /**
-     * @param Schema $schema
-     */
-    public function down(Schema $schema)
-    {
-    }
-}

+ 0 - 52
app/Migrations/Schema/V110/Version20151221150100.php

@@ -1,52 +0,0 @@
-<?php
-/* For licensing terms, see /license.txt */
-
-namespace Application\Migrations\Schema\V110;
-
-use Application\Migrations\AbstractMigrationChamilo;
-use Doctrine\DBAL\Schema\Schema;
-
-/**
- * Fix c_quiz_answer's correct field for id_auto
- */
-class Version20151221150100 extends AbstractMigrationChamilo
-{
-    /**
-     * @param Schema $schema
-     */
-    public function up(Schema $schema)
-    {
-        $this->addSql("
-            UPDATE track_e_attempt a
-            INNER JOIN c_quiz_answer qa
-            ON a.question_id = qa.question_id
-            INNER JOIN c_quiz_question q
-            ON qa.question_id = q.id
-            SET a.answer = qa.id_auto
-            WHERE
-                a.answer = qa.id AND
-                q.c_id = a.c_id AND
-                q.type IN (" . MATCHING . ", " . DRAGGABLE . ", " . MATCHING_DRAGGABLE . ")
-        ");
-
-        $this->addSql("
-            UPDATE c_quiz_answer a
-            INNER JOIN c_quiz_answer b
-            ON a.question_id = b.question_id
-            INNER JOIN c_quiz_question q
-            ON b.question_id = q.id
-            SET a.correct = b.id_auto
-            WHERE
-                a.correct = b.id AND
-                q.c_id = a.c_id AND
-                q.type IN (" . MATCHING . ", " . DRAGGABLE . ", " . MATCHING_DRAGGABLE . ")
-        ");
-    }
-
-    /**
-     * @param Schema $schema
-     */
-    public function down(Schema $schema)
-    {
-    }
-}

+ 0 - 312
app/Migrations/Schema/V111/Version111.php

@@ -1,312 +0,0 @@
-<?php
-/* For licensing terms, see /license.txt */
-
-namespace Application\Migrations\Schema\V111;
-
-use Application\Migrations\AbstractMigrationChamilo;
-use Doctrine\DBAL\Schema\Schema;
-
-/**
- * Class Version111
- * Migrate file to updated to Chamilo 1.11
- *
- */
-class Version111 extends AbstractMigrationChamilo
-{
-    /**
-     * @param Schema $schema
-     *
-     * @throws \Doctrine\DBAL\Schema\SchemaException
-     */
-    public function up(Schema $schema)
-    {
-        $this->addSql('CREATE TABLE extra_field_saved_search (id INT AUTO_INCREMENT NOT NULL, field_id INT DEFAULT NULL, user_id INT DEFAULT NULL, value LONGTEXT DEFAULT NULL COLLATE utf8_unicode_ci, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, INDEX IDX_16ABE32A443707B0 (field_id), INDEX IDX_16ABE32AA76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
-        $this->addSql('ALTER TABLE extra_field_saved_search ADD CONSTRAINT FK_16ABE32A443707B0 FOREIGN KEY (field_id) REFERENCES extra_field (id)');
-        $this->addSql('ALTER TABLE extra_field_saved_search ADD CONSTRAINT FK_16ABE32AA76ED395 FOREIGN KEY (user_id) REFERENCES user (id)');
-
-        $this->addSql('CREATE TABLE c_lp_category_user (id INT AUTO_INCREMENT NOT NULL, category_id INT DEFAULT NULL, INDEX IDX_61F042712469DE2 (category_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
-        $this->addSql('ALTER TABLE c_lp_category_user ADD CONSTRAINT FK_61F042712469DE2 FOREIGN KEY (category_id) REFERENCES c_lp_category (iid)');
-
-        $this->addSql('ALTER TABLE c_lp_category_user ADD user_id INT DEFAULT NULL;');
-        $this->addSql('ALTER TABLE c_lp_category_user ADD CONSTRAINT FK_61F0427A76ED395 FOREIGN KEY (user_id) REFERENCES user (id);');
-        $this->addSql('CREATE INDEX IDX_61F0427A76ED395 ON c_lp_category_user (user_id);');
-
-        $this->addSql("INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('allow_my_files',NULL,'radio','Platform','true','AllowMyFilesTitle','AllowMyFilesComment','',NULL, 1)");
-        $this->addSql("INSERT INTO settings_options (variable, value, display_text) VALUES ('allow_my_files','true','Yes') ");
-        $this->addSql("INSERT INTO settings_options (variable, value, display_text) VALUES ('allow_my_files','false','No') ");
-
-        $this->addSql("INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('exercise_invisible_in_session',NULL,'radio','Session','false','ExerciseInvisibleInSessionTitle','ExerciseInvisibleInSessionComment','',NULL, 1)");
-        $this->addSql("INSERT INTO settings_options (variable, value, display_text) VALUES ('exercise_invisible_in_session','true','Yes') ");
-        $this->addSql("INSERT INTO settings_options (variable, value, display_text) VALUES ('exercise_invisible_in_session','false','No') ");
-
-        $this->addSql("INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('configure_exercise_visibility_in_course',NULL,'radio','Session','false','ConfigureExerciseVisibilityInCourseTitle','ConfigureExerciseVisibilityInCourseComment','',NULL, 1)");
-        $this->addSql("INSERT INTO settings_options (variable, value, display_text) VALUES ('configure_exercise_visibility_in_course','true','Yes') ");
-        $this->addSql("INSERT INTO settings_options (variable, value, display_text) VALUES ('configure_exercise_visibility_in_course','false','No') ");
-        $this->addSql("ALTER TABLE c_forum_forum ADD moderated TINYINT(1) DEFAULT NULL");
-        $this->addSql("ALTER TABLE c_forum_post ADD status INT DEFAULT NULL");
-        $this->addSql("CREATE TABLE c_quiz_rel_category (iid BIGINT AUTO_INCREMENT NOT NULL, c_id INT NOT NULL, category_id INT NOT NULL, exercise_id INT NOT NULL, count_questions INT NOT NULL, PRIMARY KEY(iid))");
-        $this->addSql("ALTER TABLE c_quiz ADD COLUMN question_selection_type INT");
-
-        $this->addSql("CREATE TABLE faq_question_translation (id INT AUTO_INCREMENT NOT NULL, translatable_id INT DEFAULT NULL, headline VARCHAR(255) NOT NULL, body LONGTEXT DEFAULT NULL, slug VARCHAR(50) NOT NULL, locale VARCHAR(255) NOT NULL, INDEX IDX_C2D1A2C2AC5D3 (translatable_id), UNIQUE INDEX faq_question_translation_unique_translation (translatable_id, locale), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;");
-        $this->addSql("CREATE TABLE faq_category_translation (id INT AUTO_INCREMENT NOT NULL, translatable_id INT DEFAULT NULL, headline VARCHAR(255) NOT NULL, body LONGTEXT DEFAULT NULL, slug VARCHAR(50) NOT NULL, locale VARCHAR(255) NOT NULL, INDEX IDX_5493B0FC2C2AC5D3 (translatable_id), UNIQUE INDEX faq_category_translation_unique_translation (translatable_id, locale), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;");
-        $this->addSql("CREATE TABLE faq_category (id INT AUTO_INCREMENT NOT NULL, rank INT NOT NULL, is_active TINYINT(1) NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, INDEX is_active_idx (is_active), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;");
-        $this->addSql("CREATE TABLE faq_question (id INT AUTO_INCREMENT NOT NULL, category_id INT DEFAULT NULL, is_active TINYINT(1) NOT NULL, rank INT NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, only_auth_users TINYINT(1) NOT NULL, INDEX IDX_4A55B05912469DE2 (category_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;");
-        $this->addSql("ALTER TABLE faq_question_translation ADD CONSTRAINT FK_C2D1A2C2AC5D3 FOREIGN KEY (translatable_id) REFERENCES faq_question (id) ON DELETE CASCADE;");
-        $this->addSql("ALTER TABLE faq_category_translation ADD CONSTRAINT FK_5493B0FC2C2AC5D3 FOREIGN KEY (translatable_id) REFERENCES faq_category (id) ON DELETE CASCADE;");
-        $this->addSql("ALTER TABLE faq_question ADD CONSTRAINT FK_4A55B05912469DE2 FOREIGN KEY (category_id) REFERENCES faq_category (id);");
-
-        $this->addSql("CREATE TABLE contact_category (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) NOT NULL, email VARCHAR(255) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;");
-        $table = $schema->getTable('session_rel_user');
-        if (!$table->hasColumn('duration')) {
-            $this->addSql("ALTER TABLE session_rel_user ADD duration INT DEFAULT NULL");
-        }
-
-        $this->addSql('CREATE TABLE access_url_rel_course_category (id INT AUTO_INCREMENT NOT NULL, access_url_id INT NOT NULL, course_category_id INT NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
-        $this->addSql("INSERT INTO access_url_rel_course_category (access_url_id, course_category_id) VALUES (1, 1) ");
-        $this->addSql("INSERT INTO access_url_rel_course_category (access_url_id, course_category_id) VALUES (1, 2) ");
-        $this->addSql("INSERT INTO access_url_rel_course_category (access_url_id, course_category_id) VALUES (1, 3) ");
-
-        $this->addSql('ALTER TABLE notification CHANGE content content TEXT');
-
-        // Needed to update 0000-00-00 00:00:00 values
-        $this->addSql('SET sql_mode = ""');
-
-        $this->addSql('UPDATE c_lp SET publicated_on = NULL WHERE publicated_on = "0000-00-00 00:00:00"');
-        $this->addSql('UPDATE c_lp SET expired_on = NULL WHERE expired_on = "0000-00-00 00:00:00"');
-
-        $this->addSql('ALTER TABLE c_lp CHANGE publicated_on publicated_on DATETIME');
-        $this->addSql('ALTER TABLE c_lp CHANGE expired_on expired_on DATETIME');
-
-        $this->addSql('UPDATE c_quiz SET start_time = NULL WHERE start_time = "0000-00-00 00:00:00"');
-        $this->addSql('UPDATE c_quiz SET end_time = NULL WHERE end_time = "0000-00-00 00:00:00"');
-
-        $this->addSql('ALTER TABLE c_quiz CHANGE start_time start_time DATETIME');
-        $this->addSql('ALTER TABLE c_quiz CHANGE end_time end_time DATETIME');
-
-        $this->addSql('UPDATE c_calendar_event SET start_date = NULL WHERE start_date = "0000-00-00 00:00:00"');
-        $this->addSql('UPDATE c_calendar_event SET end_date = NULL WHERE end_date = "0000-00-00 00:00:00"');
-
-        $this->addSql('ALTER TABLE c_calendar_event CHANGE start_date start_date DATETIME');
-        $this->addSql('ALTER TABLE c_calendar_event CHANGE end_date end_date DATETIME');
-
-        $this->addSql('UPDATE personal_agenda SET date = NULL WHERE date = "0000-00-00 00:00:00"');
-        $this->addSql('UPDATE personal_agenda SET enddate = NULL WHERE enddate = "0000-00-00 00:00:00"');
-
-        $this->addSql('ALTER TABLE personal_agenda CHANGE date date DATETIME');
-        $this->addSql('ALTER TABLE personal_agenda CHANGE enddate enddate DATETIME');
-
-        $this->addSql('UPDATE c_forum_forum SET start_time = NULL WHERE start_time = "0000-00-00 00:00:00"');
-        $this->addSql('UPDATE c_forum_forum SET end_time = NULL WHERE end_time = "0000-00-00 00:00:00"');
-
-        $this->addSql('ALTER TABLE c_forum_forum CHANGE start_time start_time DATETIME');
-        $this->addSql('ALTER TABLE c_forum_forum CHANGE end_time end_time DATETIME');
-
-        $this->addSql('UPDATE sys_calendar SET start_date = NULL WHERE start_date = "0000-00-00 00:00:00"');
-        $this->addSql('UPDATE sys_calendar SET end_date = NULL WHERE end_date = "0000-00-00 00:00:00"');
-
-        $this->addSql('ALTER TABLE sys_calendar CHANGE start_date start_date DATETIME');
-        $this->addSql('ALTER TABLE sys_calendar CHANGE end_date end_date DATETIME');
-
-        $this->addSql('UPDATE message SET update_date = NULL WHERE update_date = "0000-00-00 00:00:00"');
-        $this->addSql('ALTER TABLE message CHANGE update_date update_date DATETIME');
-
-        $this->addSql('UPDATE c_wiki_conf SET startdate_assig = NULL WHERE startdate_assig = "0000-00-00 00:00:00"');
-        $this->addSql('UPDATE c_wiki_conf SET enddate_assig = NULL WHERE enddate_assig = "0000-00-00 00:00:00"');
-
-        $this->addSql('ALTER TABLE c_wiki_conf CHANGE startdate_assig startdate_assig DATETIME');
-        $this->addSql('ALTER TABLE c_wiki_conf CHANGE enddate_assig enddate_assig DATETIME');
-
-        $this->addSql('UPDATE c_wiki SET time_edit = NULL WHERE time_edit = "0000-00-00 00:00:00"');
-        $this->addSql('ALTER TABLE c_wiki CHANGE time_edit time_edit DATETIME');
-
-        $this->addSql('UPDATE c_wiki SET dtime = NULL WHERE dtime = "0000-00-00 00:00:00"');
-        $this->addSql('ALTER TABLE c_wiki CHANGE dtime dtime DATETIME');
-
-        $this->addSql('UPDATE access_url SET tms = NULL WHERE tms = "0000-00-00 00:00:00"');
-        $this->addSql('ALTER TABLE access_url CHANGE tms tms DATETIME');
-
-        $this->addSql('UPDATE track_e_attempt SET tms = NULL WHERE tms = "0000-00-00 00:00:00"');
-        $this->addSql('ALTER TABLE track_e_attempt CHANGE tms tms DATETIME');
-
-        $this->addSql('UPDATE track_e_default SET default_date = NULL WHERE default_date = "0000-00-00 00:00:00"');
-        $this->addSql('ALTER TABLE track_e_default CHANGE default_date default_date DATETIME');
-
-        $this->addSql('ALTER TABLE track_e_exercises CHANGE expired_time_control expired_time_control DATETIME');
-
-        $this->addSql('DROP TABLE group_rel_user');
-        $this->addSql('DROP TABLE group_rel_tag');
-        $this->addSql('DROP TABLE group_rel_group');
-        $this->addSql('DROP TABLE groups');
-
-        if ($schema->hasTable('plugin_ticket_ticket')) {
-            $this->addSql('ALTER TABLE plugin_ticket_ticket ADD COLUMN subject varchar(255) DEFAULT NULL;');
-            $this->addSql('ALTER TABLE plugin_ticket_ticket ADD COLUMN message text NOT NULL;');
-            $this->addSql('UPDATE plugin_ticket_ticket t INNER JOIN plugin_ticket_message as m  ON(t.ticket_id = m.ticket_id and message_id =1)  SET t.subject = m.subject');
-            $this->addSql('UPDATE plugin_ticket_ticket t INNER JOIN plugin_ticket_message as m  ON(t.ticket_id = m.ticket_id and message_id =1)  SET t.message = m.message');
-            $this->addSql('DELETE FROM plugin_ticket_message WHERE message_id = 1');
-
-            $this->addSql('RENAME TABLE plugin_ticket_assigned_log TO ticket_assigned_log');
-            $this->addSql('RENAME TABLE plugin_ticket_category TO ticket_category');
-            $this->addSql('RENAME TABLE plugin_ticket_category_rel_user TO ticket_category_rel_user');
-            $this->addSql('RENAME TABLE plugin_ticket_message TO ticket_message');
-            $this->addSql('RENAME TABLE plugin_ticket_message_attachments TO ticket_message_attachments');
-            $this->addSql('RENAME TABLE plugin_ticket_priority TO ticket_priority');
-            $this->addSql('RENAME TABLE plugin_ticket_project TO ticket_project');
-            $this->addSql('RENAME TABLE plugin_ticket_status TO ticket_status');
-            $this->addSql('RENAME TABLE plugin_ticket_ticket TO ticket_ticket');
-
-            $this->addSql('UPDATE ticket_project SET sys_insert_user_id = 1 WHERE sys_insert_user_id IS NULL');
-            $this->addSql('UPDATE ticket_project SET sys_insert_datetime = NOW() WHERE sys_insert_datetime IS NULL');
-            $this->addSql('ALTER TABLE ticket_project DROP project_id, CHANGE id id INT AUTO_INCREMENT NOT NULL, CHANGE name name VARCHAR(255) NOT NULL, CHANGE description description LONGTEXT DEFAULT NULL, CHANGE email email VARCHAR(255) DEFAULT NULL, CHANGE other_area other_area INT DEFAULT NULL, CHANGE sys_insert_user_id sys_insert_user_id INT NOT NULL, CHANGE sys_insert_datetime sys_insert_datetime DATETIME NOT NULL, CHANGE sys_lastedit_user_id sys_lastedit_user_id INT DEFAULT NULL;');
-
-            $this->addSql('ALTER TABLE ticket_status ADD code VARCHAR(255) NOT NULL, CHANGE id id INT AUTO_INCREMENT NOT NULL, CHANGE name name VARCHAR(255) NOT NULL, CHANGE description description LONGTEXT DEFAULT NULL;');
-            $this->addSql('UPDATE ticket_status SET code = status_id ');
-            $this->addSql('ALTER TABLE ticket_status DROP status_id');
-            $this->addSql('ALTER TABLE ticket_category_rel_user CHANGE id id INT AUTO_INCREMENT NOT NULL, CHANGE category_id category_id INT DEFAULT NULL, CHANGE user_id user_id INT DEFAULT NULL;');
-
-
-            $this->addSql('UPDATE ticket_category SET sys_insert_user_id = 1 WHERE sys_insert_user_id IS NULL');
-            $this->addSql('UPDATE ticket_category SET sys_insert_datetime = NOW() WHERE sys_insert_datetime IS NULL');
-            $this->addSql('UPDATE ticket_category SET course_required = 0 WHERE course_required IS NULL OR course_required = ""');
-
-            $this->addSql('UPDATE ticket_category SET project_id = 1 WHERE project_id IS NULL OR project_id = ""');
-
-            $this->addSql('ALTER TABLE ticket_category DROP category_id, CHANGE id id INT AUTO_INCREMENT NOT NULL, CHANGE project_id project_id INT DEFAULT NULL, CHANGE name name VARCHAR(255) NOT NULL, CHANGE description description LONGTEXT DEFAULT NULL, CHANGE total_tickets total_tickets INT NOT NULL, CHANGE course_required course_required TINYINT(1) NOT NULL, CHANGE sys_insert_user_id sys_insert_user_id INT NOT NULL, CHANGE sys_insert_datetime sys_insert_datetime DATETIME NOT NULL, CHANGE sys_lastedit_user_id sys_lastedit_user_id INT DEFAULT NULL;');
-            $this->addSql('ALTER TABLE ticket_category ADD CONSTRAINT FK_8325E540166D1F9C FOREIGN KEY (project_id) REFERENCES ticket_project (id);');
-            $this->addSql('CREATE INDEX IDX_8325E540166D1F9C ON ticket_category (project_id);');
-
-            $this->addSql('ALTER TABLE ticket_category_rel_user ADD CONSTRAINT FK_5B8A98712469DE2 FOREIGN KEY (category_id) REFERENCES ticket_category (id);');
-            $this->addSql('ALTER TABLE ticket_category_rel_user ADD CONSTRAINT FK_5B8A987A76ED395 FOREIGN KEY (user_id) REFERENCES user (id);');
-
-            $this->addSql('CREATE INDEX IDX_5B8A98712469DE2 ON ticket_category_rel_user (category_id);');
-            $this->addSql('CREATE INDEX IDX_5B8A987A76ED395 ON ticket_category_rel_user (user_id);');
-
-            $this->addSql('ALTER TABLE ticket_message_attachments DROP message_attch_id, CHANGE id id INT AUTO_INCREMENT NOT NULL, CHANGE message_id message_id INT DEFAULT NULL, CHANGE ticket_id ticket_id INT DEFAULT NULL, CHANGE filename filename LONGTEXT NOT NULL, CHANGE size size INT NOT NULL, CHANGE sys_insert_user_id sys_insert_user_id INT NOT NULL, CHANGE sys_insert_datetime sys_insert_datetime DATETIME NOT NULL, CHANGE sys_lastedit_user_id sys_lastedit_user_id INT DEFAULT NULL;');
-
-            // missing
-            $this->addSql('ALTER TABLE ticket_message_attachments ADD CONSTRAINT FK_70BF9E26700047D2 FOREIGN KEY (ticket_id) REFERENCES ticket_ticket (id);');
-            $this->addSql('CREATE INDEX IDX_70BF9E26700047D2 ON ticket_message_attachments (ticket_id);');
-            $this->addSql('ALTER TABLE ticket_message_attachments RENAME INDEX ticket_message_id_fk TO IDX_70BF9E26537A1329;');
-
-
-            $this->addSql('UPDATE ticket_priority SET sys_insert_user_id = 1 WHERE sys_insert_user_id IS NULL');
-            $this->addSql('UPDATE ticket_priority SET sys_insert_datetime = NOW() WHERE sys_insert_datetime IS NULL');
-
-            $this->addSql('ALTER TABLE ticket_priority ADD code VARCHAR(255) NOT NULL, ADD name VARCHAR(255) NOT NULL, ADD description LONGTEXT DEFAULT NULL, ADD color VARCHAR(255) NOT NULL, ADD urgency VARCHAR(255) NOT NULL, CHANGE id id INT AUTO_INCREMENT NOT NULL, CHANGE sys_insert_user_id sys_insert_user_id INT NOT NULL, CHANGE sys_insert_datetime sys_insert_datetime DATETIME NOT NULL, CHANGE sys_lastedit_user_id sys_lastedit_user_id INT DEFAULT NULL;');
-
-            $this->addSql('UPDATE ticket_priority SET code = priority_id');
-            $this->addSql('UPDATE ticket_priority SET name = priority');
-            $this->addSql('UPDATE ticket_priority SET description = priority_desc');
-            $this->addSql('UPDATE ticket_priority SET color = priority_color');
-            $this->addSql('UPDATE ticket_priority SET urgency = priority_urgency');
-
-            $this->addSql('ALTER TABLE ticket_priority DROP priority_id, DROP priority, DROP priority_desc, DROP priority_color, DROP priority_urgency');
-
-
-            $this->addSql('ALTER TABLE ticket_ticket MODIFY ticket_id INT UNSIGNED NOT NULL;');
-            $this->addSql('DROP INDEX UN_ticket_code ON ticket_ticket;');
-            $this->addSql('DROP INDEX FK_ticket_category ON ticket_ticket;');
-            $this->addSql('ALTER TABLE ticket_ticket DROP PRIMARY KEY;');
-
-            $this->addSql('UPDATE ticket_ticket t SET priority_id = (SELECT id FROM ticket_priority t2 WHERE t2.code = t.priority_id)');
-            $this->addSql('UPDATE ticket_ticket t SET status_id = (SELECT id FROM ticket_status t2 WHERE t2.code = t.status_id)');
-
-            $this->addSql('ALTER TABLE ticket_ticket ADD id INT NOT NULL, ADD code VARCHAR(255) NOT NULL, CHANGE project_id project_id INT DEFAULT NULL, CHANGE priority_id priority_id INT DEFAULT NULL, CHANGE course_id course_id INT DEFAULT NULL, CHANGE session_id session_id INT DEFAULT NULL, CHANGE personal_email personal_email VARCHAR(255) NOT NULL, CHANGE assigned_last_user assigned_last_user INT DEFAULT NULL, CHANGE status_id status_id INT DEFAULT NULL, CHANGE total_messages total_messages INT NOT NULL, CHANGE keyword keyword VARCHAR(255) DEFAULT NULL, CHANGE source source VARCHAR(255) DEFAULT NULL, CHANGE start_date start_date DATETIME DEFAULT NULL, CHANGE sys_insert_user_id sys_insert_user_id INT NOT NULL, CHANGE sys_insert_datetime sys_insert_datetime DATETIME NOT NULL, CHANGE sys_lastedit_user_id sys_lastedit_user_id INT DEFAULT NULL, CHANGE subject subject VARCHAR(255) NOT NULL, CHANGE message message LONGTEXT DEFAULT NULL;');
-
-            $this->addSql('UPDATE ticket_ticket SET code = ticket_code');
-            $this->addSql('UPDATE ticket_ticket SET id = ticket_id');
-            $this->addSql('ALTER TABLE ticket_ticket DROP ticket_id, DROP ticket_code, DROP request_user');
-            $this->addSql('ALTER TABLE ticket_ticket MODIFY COLUMN id INT NOT NULL PRIMARY KEY AUTO_INCREMENT');
-            $this->addSql('ALTER TABLE ticket_ticket ADD CONSTRAINT FK_EDE2C768497B19F9 FOREIGN KEY (priority_id) REFERENCES ticket_priority (id);');
-
-            $this->addSql('UPDATE ticket_ticket SET project_id = 1 WHERE project_id is NULL or project_id = 0');
-            $this->addSql('ALTER TABLE ticket_ticket ADD CONSTRAINT FK_EDE2C768166D1F9C FOREIGN KEY (project_id) REFERENCES ticket_project (id);');
-
-            $this->addSql('UPDATE ticket_ticket SET course_id = NULL WHERE course_id = 0');
-            $this->addSql('ALTER TABLE ticket_ticket ADD CONSTRAINT FK_EDE2C768591CC992 FOREIGN KEY (course_id) REFERENCES course (id);');
-
-            $this->addSql('UPDATE ticket_ticket SET session_id = NULL WHERE session_id = 0');
-            $this->addSql('ALTER TABLE ticket_ticket ADD CONSTRAINT FK_EDE2C768613FECDF FOREIGN KEY (session_id) REFERENCES session (id);');
-
-            $this->addSql('ALTER TABLE ticket_ticket ADD CONSTRAINT FK_EDE2C7686BF700BD FOREIGN KEY (status_id) REFERENCES ticket_status (id);');
-            $this->addSql('CREATE INDEX IDX_EDE2C768166D1F9C ON ticket_ticket (project_id);');
-            $this->addSql('CREATE INDEX IDX_EDE2C768591CC992 ON ticket_ticket (course_id);');
-            $this->addSql('CREATE INDEX IDX_EDE2C768613FECDF ON ticket_ticket (session_id);');
-            $this->addSql('CREATE INDEX IDX_EDE2C7686BF700BD ON ticket_ticket (status_id);');
-
-            $this->addSql('ALTER TABLE ticket_ticket RENAME INDEX fk_ticket_priority TO IDX_EDE2C768497B19F9;');
-            $this->addSql('ALTER TABLE ticket_assigned_log CHANGE id id INT AUTO_INCREMENT NOT NULL, CHANGE ticket_id ticket_id INT DEFAULT NULL, CHANGE user_id user_id INT DEFAULT NULL, CHANGE assigned_date assigned_date DATETIME NOT NULL, CHANGE sys_insert_user_id sys_insert_user_id INT NOT NULL;');
-            $this->addSql('ALTER TABLE ticket_assigned_log ADD CONSTRAINT FK_54B65868700047D2 FOREIGN KEY (ticket_id) REFERENCES ticket_ticket (id);');
-
-            $this->addSql('DELETE FROM ticket_assigned_log WHERE user_id = 0 OR user_id IS NULL');
-
-            $this->addSql('ALTER TABLE ticket_assigned_log ADD CONSTRAINT FK_54B65868A76ED395 FOREIGN KEY (user_id) REFERENCES user (id);');
-            $this->addSql('CREATE INDEX IDX_54B65868A76ED395 ON ticket_assigned_log (user_id);');
-            $this->addSql('ALTER TABLE ticket_assigned_log RENAME INDEX fk_ticket_assigned_log TO IDX_54B65868700047D2;');
-
-            $this->addSql('ALTER TABLE ticket_category_rel_user RENAME INDEX fk_5b8a98712469de2 TO IDX_5B8A98712469DE2;');
-            $this->addSql('ALTER TABLE ticket_category_rel_user RENAME INDEX fk_5b8a987a76ed395 TO IDX_5B8A987A76ED395;');
-
-            $this->addSql('ALTER TABLE ticket_message DROP message_id, CHANGE id id INT AUTO_INCREMENT NOT NULL, CHANGE ticket_id ticket_id INT DEFAULT NULL, CHANGE subject subject VARCHAR(255) DEFAULT NULL, CHANGE message message LONGTEXT DEFAULT NULL, CHANGE status status VARCHAR(255) NOT NULL, CHANGE ip_address ip_address VARCHAR(255) NOT NULL, CHANGE sys_insert_user_id sys_insert_user_id INT NOT NULL, CHANGE sys_insert_datetime sys_insert_datetime DATETIME NOT NULL, CHANGE sys_lastedit_user_id sys_lastedit_user_id INT DEFAULT NULL;');
-
-            $this->addSql('ALTER TABLE ticket_message ADD CONSTRAINT FK_BA71692D700047D2 FOREIGN KEY (ticket_id) REFERENCES ticket_ticket (id);');
-            $this->addSql('ALTER TABLE ticket_message RENAME INDEX fk_tick_message TO IDX_BA71692D700047D2;');
-            $this->addSql('ALTER TABLE ticket_ticket CHANGE category_id category_id INT DEFAULT NULL;');
-            $this->addSql('ALTER TABLE ticket_ticket ADD CONSTRAINT FK_EDE2C76812469DE2 FOREIGN KEY (category_id) REFERENCES ticket_category (id);');
-            $this->addSql('CREATE INDEX IDX_EDE2C76812469DE2 ON ticket_ticket (category_id);');
-
-            $this->addSql('ALTER TABLE ticket_message_attachments ADD CONSTRAINT FK_70BF9E26537A1329 FOREIGN KEY (message_id) REFERENCES ticket_message (id);');
-            $this->addSql('DELETE FROM settings_current WHERE title = "Ticket"');
-        }
-
-        $this->addSql("INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('ticket_allow_student_add', NULL, 'radio','Ticket', 'false','TicketAllowStudentAddTitle','TicketAllowStudentAddComment',NULL,NULL, 0)");
-        $this->addSql("INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('ticket_allow_category_edition', NULL, 'radio','Ticket', 'false','TicketAllowCategoryEditionTitle','TicketAllowCategoryEditionComment',NULL,NULL, 0)");
-        $this->addSql("INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('ticket_send_warning_to_all_admins', NULL, 'radio','Ticket', 'false','TicketSendWarningToAllAdminsTitle','TicketSendWarningToAllAdminsComment',NULL,NULL, 0)");
-        $this->addSql("INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('ticket_warn_admin_no_user_in_category', NULL, 'radio','Ticket', 'false','TicketWarnAdminNoUserInCategoryTitle','TicketWarnAdminNoUserInCategoryComment',NULL,NULL, 0)");
-        $this->addSql("INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('load_term_conditions_section', NULL, 'radio','Platform', 'login','LoadTermConditionsSectionTitle','LoadTermConditionsSectionDescription',NULL,NULL, 0)");
-        $this->addSql("INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('show_terms_if_profile_completed', NULL, 'radio','Ticket', 'false','ShowTermsIfProfileCompletedTitle','ShowTermsIfProfileCompletedComment',NULL,NULL, 0)");
-
-        $this->addSql("INSERT INTO settings_options (variable, value, display_text) VALUES ('ticket_allow_student_add', 'true', 'Yes'), ('ticket_allow_student_add', 'false', 'No')");
-        $this->addSql("INSERT INTO settings_options (variable, value, display_text) VALUES ('ticket_allow_category_edition', 'true', 'Yes'), ('ticket_allow_category_edition', 'false', 'No')");
-        $this->addSql("INSERT INTO settings_options (variable, value, display_text) VALUES ('ticket_send_warning_to_all_admins', 'true', 'Yes'), ('ticket_send_warning_to_all_admins', 'false', 'No')");
-        $this->addSql("INSERT INTO settings_options (variable, value, display_text) VALUES ('ticket_warn_admin_no_user_in_category', 'true', 'Yes'), ('ticket_warn_admin_no_user_in_category', 'false', 'No')");
-        $this->addSql("INSERT INTO settings_options (variable, value, display_text) VALUES ('load_term_conditions_section', 'login', 'Login'), ('load_term_conditions_section', 'course', 'Course')");
-        $this->addSql("INSERT INTO settings_options (variable, value, display_text) VALUES ('show_terms_if_profile_completed', 'true', 'Yes'), ('show_terms_if_profile_completed', 'false', 'No')");
-
-        $this->addSql("ALTER TABLE c_quiz_question_rel_category ADD INDEX idx_qqrc_qid (question_id)");
-        $this->addSql("ALTER TABLE c_quiz_answer ADD INDEX idx_cqa_q (question_id)");
-        $this->addSql("ALTER TABLE c_student_publication ADD INDEX idx_csp_u (user_id)");
-
-        $this->addSql('ALTER TABLE legal DROP PRIMARY KEY;');
-        $this->addSql('ALTER TABLE legal ADD id INT');
-        $this->addSql('UPDATE legal SET id = legal_id');
-        $this->addSql('UPDATE legal SET id = 1 WHERE id = 0');
-        $this->addSql('ALTER TABLE legal MODIFY COLUMN language_id INT NOT NULL');
-        $this->addSql('ALTER TABLE legal DROP legal_id');
-        $this->addSql('ALTER TABLE legal CHANGE id id INT AUTO_INCREMENT NOT NULL PRIMARY KEY;');
-
-        $this->addSql('ALTER TABLE user ADD profile_completed TINYINT(1) DEFAULT NULL;');
-        $this->addSql('ALTER TABLE extra_field_options CHANGE display_text display_text VARCHAR(255) DEFAULT NULL');
-        $this->addSql('ALTER TABLE extra_field CHANGE variable variable VARCHAR(255) NOT NULL');
-
-        if (!$schema->hasTable('version')) {
-            $this->addSql('CREATE TABLE version (version varchar(255), PRIMARY KEY(version));');
-        }
-    }
-
-    /**
-     * @param Schema $schema
-     */
-    public function postUp(Schema $schema)
-    {
-    }
-
-    /**
-     * @param Schema $schema
-     */
-    public function down(Schema $schema)
-    {
-        $this->addSql('DROP TABLE c_lp_category_user');
-        $this->addSql('DROP TABLE access_url_rel_course_category');
-    }
-}

+ 7 - 6
app/Migrations/Schema/V111/Version20160330103045.php

@@ -15,6 +15,7 @@ class Version20160330103045 extends AbstractMigration
      */
     public function up(Schema $schema)
     {
+        /*
         $this->addSql(
             'CREATE TABLE page__site (id INT AUTO_INCREMENT NOT NULL, enabled TINYINT(1) NOT NULL, name VARCHAR(255) NOT NULL, relative_path VARCHAR(255) DEFAULT NULL, host VARCHAR(255) NOT NULL, enabled_from DATETIME DEFAULT NULL, enabled_to DATETIME DEFAULT NULL, is_default TINYINT(1) NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, locale VARCHAR(6) DEFAULT NULL, title VARCHAR(64) DEFAULT NULL, meta_keywords VARCHAR(255) DEFAULT NULL, meta_description VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB'
         );
@@ -106,7 +107,7 @@ class Version20160330103045 extends AbstractMigration
         $this->addSql("ALTER TABLE timeline__action_component ADD CONSTRAINT FK_6ACD1B169D32F035 FOREIGN KEY (action_id) REFERENCES timeline__action (id) ON DELETE CASCADE;");
         $this->addSql("ALTER TABLE timeline__action_component ADD CONSTRAINT FK_6ACD1B16E2ABAFFF FOREIGN KEY (component_id) REFERENCES timeline__component (id) ON DELETE CASCADE;");
         //$this->addSql("CREATE UNIQUE INDEX UNIQ_8D93D649A0D96FBF ON user (email_canonical);");
-
+        */
         $this->addSql('DROP TABLE extra_field_saved_search');
         $this->addSql('DROP INDEX user_sco_course_sv_stack ON track_stored_values_stack');
         $this->addSql('ALTER TABLE session_rel_user ADD duration INT DEFAULT NULL');
@@ -125,7 +126,7 @@ class Version20160330103045 extends AbstractMigration
 
         $sql = "UPDATE user SET roles = 'a:0:{}'";
         $this->addSql($sql);
-        
+
         $sql = "UPDATE user SET enabled = '1' WHERE active = 1";
         $this->addSql($sql);
 
@@ -135,10 +136,10 @@ class Version20160330103045 extends AbstractMigration
         $sql = "UPDATE user SET username_canonical = username";
         $this->addSql($sql);
 
-        $this->addSql("CREATE TABLE fos_user_user_group (user_id INT NOT NULL, group_id INT NOT NULL, INDEX IDX_B3C77447A76ED395 (user_id), INDEX IDX_B3C77447FE54D947 (group_id), PRIMARY KEY(user_id, group_id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;");
+        /*$this->addSql("CREATE TABLE fos_user_user_group (user_id INT NOT NULL, group_id INT NOT NULL, INDEX IDX_B3C77447A76ED395 (user_id), INDEX IDX_B3C77447FE54D947 (group_id), PRIMARY KEY(user_id, group_id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;");
         $this->addSql("CREATE TABLE fos_group (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) NOT NULL, roles LONGTEXT NOT NULL COMMENT '(DC2Type:array)', code VARCHAR(40) NOT NULL, UNIQUE INDEX UNIQ_4B019DDB5E237E06 (name), UNIQUE INDEX UNIQ_4B019DDB77153098 (code), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;");
         $this->addSql("ALTER TABLE fos_user_user_group ADD CONSTRAINT FK_B3C77447A76ED395 FOREIGN KEY (user_id) REFERENCES user (id);");
-        $this->addSql("ALTER TABLE fos_user_user_group ADD CONSTRAINT FK_B3C77447FE54D947 FOREIGN KEY (group_id) REFERENCES fos_group (id);");
+        $this->addSql("ALTER TABLE fos_user_user_group ADD CONSTRAINT FK_B3C77447FE54D947 FOREIGN KEY (group_id) REFERENCES fos_group (id);");*/
     }
 
     /**
@@ -171,7 +172,7 @@ class Version20160330103045 extends AbstractMigration
         $this->addSql(
             'ALTER TABLE extra_field_saved_search ADD CONSTRAINT FK_16ABE32AA76ED395 FOREIGN KEY (user_id) REFERENCES user (id)'
         );
-        $this->addSql('DROP TABLE page__site');
+        /*$this->addSql('DROP TABLE page__site');
         $this->addSql('DROP TABLE page__page');
         $this->addSql('DROP TABLE page__snapshot');
         $this->addSql('DROP TABLE page__bloc');
@@ -181,7 +182,7 @@ class Version20160330103045 extends AbstractMigration
         $this->addSql('DROP TABLE classification__collection');
         $this->addSql('DROP TABLE media__gallery');
         $this->addSql('DROP TABLE media__media');
-        $this->addSql('DROP TABLE media__gallery_media');
+        $this->addSql('DROP TABLE media__gallery_media');*/
         $this->addSql('ALTER TABLE session_rel_user DROP duration');
         $this->addSql('CREATE INDEX user_sco_course_sv ON track_stored_values (user_id, sco_id, course_id, sv_key)');
         $this->addSql(

+ 47 - 0
app/Migrations/Schema/V111/Version20160628220000.php

@@ -0,0 +1,47 @@
+<?php
+/* For licensing terms, see /license.txt */
+
+namespace Application\Migrations\Schema\V111;
+
+use Application\Migrations\AbstractMigrationChamilo;
+use Doctrine\DBAL\Schema\Schema;
+use Doctrine\DBAL\Types\Type;
+
+/**
+ * Class Version20160628220000
+ * Integrate the Skype plugin and create new settings current to enable it
+ * @package Application\Migrations\Schema\V111
+ */
+class Version20160628220000 extends AbstractMigrationChamilo
+{
+    /**
+     * @param Schema $schema
+     * @throws \Doctrine\DBAL\DBALException
+     * @throws \Doctrine\DBAL\Schema\SchemaException
+     */
+    public function up(Schema $schema)
+    {
+        $this
+            ->connection
+            ->executeQuery("UPDATE c_lp_item SET item_type = 'dir' WHERE item_type = 'dokeos_chapter'");
+        $this
+            ->connection
+            ->executeQuery("UPDATE c_lp_item SET item_type = 'dir' WHERE item_type = 'dokeos_module'");
+        $this
+            ->connection
+            ->executeQuery("UPDATE c_lp_item SET item_type = 'dir' WHERE item_type = 'chapter'");
+        $this
+            ->connection
+            ->executeQuery("UPDATE c_lp_item SET item_type = 'dir' WHERE item_type = 'module'");
+    }
+
+    /**
+     * @param Schema $schema
+     * @throws \Doctrine\DBAL\DBALException
+     * @throws \Doctrine\DBAL\Schema\SchemaException
+     */
+    public function down(Schema $schema)
+    {
+
+    }
+}

+ 39 - 0
app/Migrations/Schema/V111/Version20160701110000.php

@@ -0,0 +1,39 @@
+<?php
+/* For licensing terms, see /license.txt */
+
+namespace Application\Migrations\Schema\V111;
+
+use Application\Migrations\AbstractMigrationChamilo;
+use Doctrine\DBAL\Schema\Schema;
+use Doctrine\DBAL\Types\Type;
+
+/**
+ * Class Version20160701110000
+ * Add option to remove splash screen on course creation
+ * @package Application\Migrations\Schema\V111
+ */
+class Version20160701110000 extends AbstractMigrationChamilo
+{
+    /**
+     * @param Schema $schema
+     * @throws \Doctrine\DBAL\DBALException
+     * @throws \Doctrine\DBAL\Schema\SchemaException
+     */
+    public function up(Schema $schema)
+    {
+        $this->addSql("INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('course_creation_splash_screen',NULL,'radio','Course','true','CourseCreationSplashScreenTitle','CourseCreationSplashScreenComment','',NULL, 1)");
+        $this->addSql("INSERT INTO settings_options (variable, value, display_text) VALUES ('course_creation_splash_screen','true','Yes') ");
+        $this->addSql("INSERT INTO settings_options (variable, value, display_text) VALUES ('course_creation_splash_screen','false','No') ");
+    }
+
+    /**
+     * @param Schema $schema
+     * @throws \Doctrine\DBAL\DBALException
+     * @throws \Doctrine\DBAL\Schema\SchemaException
+     */
+    public function down(Schema $schema)
+    {
+        $this->addSql("DELETE FROM settings_current WHERE variable = 'course_creation_splash_screen'");
+        $this->addSql("DELETE FROM settings_options WHERE variable = 'course_creation_splash_screen'");
+    }
+}

+ 36 - 0
app/Migrations/Schema/V111/Version20160705190000.php

@@ -0,0 +1,36 @@
+<?php
+/* For licensing terms, see /license.txt */
+
+namespace Application\Migrations\Schema\V111;
+
+use Application\Migrations\AbstractMigrationChamilo;
+use Doctrine\DBAL\Schema\Schema;
+use Doctrine\DBAL\Types\Type;
+
+/**
+ * Class Version20160705190000
+ * Add accumulate scorm time to c_lp table
+ * @package Application\Migrations\Schema\V111
+ */
+class Version20160705190000 extends AbstractMigrationChamilo
+{
+    /**
+     * @param Schema $schema
+     * @throws \Doctrine\DBAL\DBALException
+     * @throws \Doctrine\DBAL\Schema\SchemaException
+     */
+    public function up(Schema $schema)
+    {
+        $this->addSql("ALTER TABLE c_lp ADD COLUMN accumulate_scorm_time INT NOT NULL DEFAULT 1");
+    }
+
+    /**
+     * @param Schema $schema
+     * @throws \Doctrine\DBAL\DBALException
+     * @throws \Doctrine\DBAL\Schema\SchemaException
+     */
+    public function down(Schema $schema)
+    {
+        $this->addSql("ALTER TABLE c_lp DROP COLUMN accumulate_scorm_time");
+    }
+}

+ 46 - 0
app/Migrations/Schema/V111/Version20160705192000.php

@@ -0,0 +1,46 @@
+<?php
+/* For licensing terms, see /license.txt */
+
+namespace Application\Migrations\Schema\V111;
+
+use Application\Migrations\AbstractMigrationChamilo;
+use Doctrine\DBAL\Schema\Schema;
+use Doctrine\DBAL\Types\Type;
+
+/**
+ * Class Version20160705192000
+ * Add accumulate scorm time to c_lp table
+ * @package Application\Migrations\Schema\V111
+ */
+class Version20160705192000 extends AbstractMigrationChamilo
+{
+    /**
+     * @param Schema $schema
+     * @throws \Doctrine\DBAL\DBALException
+     * @throws \Doctrine\DBAL\Schema\SchemaException
+     */
+    public function up(Schema $schema)
+    {
+        $em = $this->getEntityManager();
+
+        $result = $em
+            ->getRepository('ChamiloCoreBundle:SettingsCurrent')
+            ->findOneBy(['variable' => 'scorm_cumulative_session_time']);
+
+        $cumulativeScormTime = 1;
+        if ($result->getSelectedValue() === 'false') {
+            $cumulativeScormTime = 0;
+        }
+        $this->addSql("UPDATE c_lp SET accumulate_scorm_time = $cumulativeScormTime");
+    }
+
+    /**
+     * @param Schema $schema
+     * @throws \Doctrine\DBAL\DBALException
+     * @throws \Doctrine\DBAL\Schema\SchemaException
+     */
+    public function down(Schema $schema)
+    {
+
+    }
+}

+ 36 - 0
app/Migrations/Schema/V111/Version20160706145000.php

@@ -0,0 +1,36 @@
+<?php
+/* For licensing terms, see /license.txt */
+
+namespace Application\Migrations\Schema\V111;
+
+use Application\Migrations\AbstractMigrationChamilo;
+use Doctrine\DBAL\Schema\Schema;
+use Doctrine\DBAL\Types\Type;
+
+/**
+ * Class Version20160706145000
+ * Add tag extra field for skills
+ * @package Application\Migrations\Schema\V111
+ */
+class Version20160706145000 extends AbstractMigrationChamilo
+{
+    /**
+     * @param Schema $schema
+     * @throws \Doctrine\DBAL\DBALException
+     * @throws \Doctrine\DBAL\Schema\SchemaException
+     */
+    public function up(Schema $schema)
+    {
+        $this->addSql("INSERT INTO extra_field (extra_field_type, field_type, variable, display_text, visible, changeable, created_at) VALUES (8, 10, 'tags', 'Tags', 1, 1, NOW())");
+    }
+
+    /**
+     * @param Schema $schema
+     * @throws \Doctrine\DBAL\DBALException
+     * @throws \Doctrine\DBAL\Schema\SchemaException
+     */
+    public function down(Schema $schema)
+    {
+        $this->addSql("DELETE FROM extra_field WHERE extra_field_type = 8 AND field_type = 10 AND variable = 'tags'");
+    }
+}

+ 42 - 0
app/Migrations/Schema/V111/Version20160706182000.php

@@ -0,0 +1,42 @@
+<?php
+/* For licensing terms, see /license.txt */
+
+namespace Application\Migrations\Schema\V111;
+
+use Application\Migrations\AbstractMigrationChamilo;
+use Doctrine\DBAL\Schema\Schema;
+use Doctrine\DBAL\Types\Type;
+
+/**
+ * Class Version20160706182000
+ * Add new table to save user visibility on courses in the catalogue
+ * @package Application\Migrations\Schema\V111
+ */
+class Version20160706182000 extends AbstractMigrationChamilo
+{
+    /**
+     * @param Schema $schema
+     *
+     * @throws \Doctrine\DBAL\DBALException
+     * @throws \Doctrine\DBAL\Schema\SchemaException
+     */
+    public function up(Schema $schema)
+    {
+         $this->addSql(
+             'CREATE TABLE course_rel_user_catalogue (id int NOT NULL AUTO_INCREMENT, user_id int DEFAULT NULL, c_id int DEFAULT NULL, visible int NOT NULL, PRIMARY KEY (id), KEY (user_id), KEY (c_id), CONSTRAINT FOREIGN KEY (c_id) REFERENCES course (id) ON DELETE CASCADE, CONSTRAINT FOREIGN KEY (user_id) REFERENCES user (id) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci'
+             );
+    }
+
+     /**
+      * @param Schema $schema
+      *
+      * @throws \Doctrine\DBAL\DBALException
+      * @throws \Doctrine\DBAL\Schema\SchemaException
+      */
+    public function down(Schema $schema)
+    {
+        $this->addSql(
+         'DROP TABLE course_rel_user_catalogue'
+         );
+    }
+}

+ 39 - 0
app/Migrations/Schema/V111/Version20160712150000.php

@@ -0,0 +1,39 @@
+<?php
+/* For licensing terms, see /license.txt */
+
+namespace Application\Migrations\Schema\V111;
+
+use Application\Migrations\AbstractMigrationChamilo;
+use Doctrine\DBAL\Schema\Schema;
+use Doctrine\DBAL\Types\Type;
+
+/**
+ * Class Version20160712150000
+ * Add option to use SVG icons instead of their PNG version
+ * @package Application\Migrations\Schema\V111
+ */
+class Version20160712150000 extends AbstractMigrationChamilo
+{
+    /**
+     * @param Schema $schema
+     * @throws \Doctrine\DBAL\DBALException
+     * @throws \Doctrine\DBAL\Schema\SchemaException
+     */
+    public function up(Schema $schema)
+    {
+        $this->addSql("INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('icons_mode_svg', NULL, 'radio', 'Tuning', 'false', 'IconsModeSVGTitle','IconsModeSVGComment','',NULL, 1)");
+        $this->addSql("INSERT INTO settings_options (variable, value, display_text) VALUES ('icons_mode_svg','true','Yes') ");
+        $this->addSql("INSERT INTO settings_options (variable, value, display_text) VALUES ('icons_mode_svg','false','No') ");
+    }
+
+    /**
+     * @param Schema $schema
+     * @throws \Doctrine\DBAL\DBALException
+     * @throws \Doctrine\DBAL\Schema\SchemaException
+     */
+    public function down(Schema $schema)
+    {
+        $this->addSql("DELETE FROM settings_current WHERE variable = 'icons_mode_svg'");
+        $this->addSql("DELETE FROM settings_options WHERE variable = 'icons_mode_svg'");
+    }
+}

+ 39 - 0
app/Migrations/Schema/V111/Version20160713180000.php

@@ -0,0 +1,39 @@
+<?php
+/* For licensing terms, see /license.txt */
+
+namespace Application\Migrations\Schema\V111;
+
+use Application\Migrations\AbstractMigrationChamilo;
+use Doctrine\DBAL\Schema\Schema;
+use Doctrine\DBAL\Types\Type;
+
+/**
+ * Class Version20160713180000
+ * Add option to use SVG icons instead of their PNG version
+ * @package Application\Migrations\Schema\V111
+ */
+class Version20160713180000 extends AbstractMigrationChamilo
+{
+    /**
+     * @param Schema $schema
+     * @throws \Doctrine\DBAL\DBALException
+     * @throws \Doctrine\DBAL\Schema\SchemaException
+     */
+    public function up(Schema $schema)
+    {
+        $this->addSql("DELETE FROM settings_current WHERE variable = 'allow_browser_sniffer'");
+        $this->addSql("DELETE FROM settings_options WHERE variable = 'allow_browser_sniffer'");
+    }
+
+    /**
+     * @param Schema $schema
+     * @throws \Doctrine\DBAL\DBALException
+     * @throws \Doctrine\DBAL\Schema\SchemaException
+     */
+    public function down(Schema $schema)
+    {
+        $this->addSql("INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('allow_browser_sniffer', NULL, 'radio', 'Tuning', 'false', 'AllowBrowserSnifferTitle','AllowBrowserSnifferComment',NULL,NULL, 0)");
+        $this->addSql("INSERT INTO settings_options (variable, value, display_text) VALUES ('allow_browser_sniffer','true','Yes') ");
+        $this->addSql("INSERT INTO settings_options (variable, value, display_text) VALUES ('allow_browser_sniffer','false','No') ");
+    }
+}

+ 4 - 4
app/Resources/public/assets/jquery-file-upload/.bower.json

@@ -1,6 +1,6 @@
 {
   "name": "blueimp-file-upload",
-  "version": "9.12.3",
+  "version": "9.12.5",
   "title": "jQuery File Upload",
   "description": "File Upload widget with multiple file selection, drag&amp;drop support, progress bar, validation and preview images.",
   "keywords": [
@@ -61,11 +61,11 @@
     "server",
     "test"
   ],
-  "_release": "9.12.3",
+  "_release": "9.12.5",
   "_resolution": {
     "type": "version",
-    "tag": "9.12.3",
-    "commit": "58188eea0e49512761263531352fa07f16de0f45"
+    "tag": "9.12.5",
+    "commit": "634724af8a866d7f3fe4d56d27c4f096f9d423d6"
   },
   "_source": "https://github.com/blueimp/jQuery-File-Upload.git",
   "_target": "*",

+ 1 - 1
app/Resources/public/assets/jquery-file-upload/bower.json

@@ -1,6 +1,6 @@
 {
   "name": "blueimp-file-upload",
-  "version": "9.12.3",
+  "version": "9.12.5",
   "title": "jQuery File Upload",
   "description": "File Upload widget with multiple file selection, drag&amp;drop support, progress bar, validation and preview images.",
   "keywords": [

+ 7 - 1
app/Resources/public/assets/jquery-file-upload/js/cors/jquery.postmessage-transport.js

@@ -11,7 +11,7 @@
 
 /* global define, require, window, document */
 
-(function (factory) {
+;(function (factory) {
     'use strict';
     if (typeof define === 'function' && define.amd) {
         // Register as an anonymous AMD module:
@@ -64,6 +64,12 @@
                 loc = $('<a>').prop('href', options.postMessage)[0],
                 target = loc.protocol + '//' + loc.host,
                 xhrUpload = options.xhr().upload;
+            // IE always includes the port for the host property of a link
+            // element, but not in the location.host or origin property for the
+            // default http port 80 and https port 443, so we strip it:
+            if (/^(http:\/\/.+:80)|(https:\/\/.+:443)$/.test(target)) {
+              target = target.replace(/:(80|443)$/, '');
+            }
             return {
                 send: function (_, completeCallback) {
                     counter += 1;

+ 1 - 1
app/Resources/public/assets/jquery-file-upload/js/cors/jquery.xdr-transport.js

@@ -14,7 +14,7 @@
 
 /* global define, require, window, XDomainRequest */
 
-(function (factory) {
+;(function (factory) {
     'use strict';
     if (typeof define === 'function' && define.amd) {
         // Register as an anonymous AMD module:

+ 1 - 1
app/Resources/public/assets/jquery-file-upload/js/jquery.fileupload-angular.js

@@ -12,7 +12,7 @@
 /* jshint nomen:false */
 /* global define, angular */
 
-(function (factory) {
+;(function (factory) {
     'use strict';
     if (typeof define === 'function' && define.amd) {
         // Register as an anonymous AMD module:

+ 1 - 1
app/Resources/public/assets/jquery-file-upload/js/jquery.fileupload-audio.js

@@ -12,7 +12,7 @@
 /* jshint nomen:false */
 /* global define, require, window, document */
 
-(function (factory) {
+;(function (factory) {
     'use strict';
     if (typeof define === 'function' && define.amd) {
         // Register as an anonymous AMD module:

+ 1 - 1
app/Resources/public/assets/jquery-file-upload/js/jquery.fileupload-image.js

@@ -12,7 +12,7 @@
 /* jshint nomen:false */
 /* global define, require, window, Blob */
 
-(function (factory) {
+;(function (factory) {
     'use strict';
     if (typeof define === 'function' && define.amd) {
         // Register as an anonymous AMD module:

+ 1 - 1
app/Resources/public/assets/jquery-file-upload/js/jquery.fileupload-jquery-ui.js

@@ -12,7 +12,7 @@
 /* jshint nomen:false */
 /* global define, require, window */
 
-(function (factory) {
+;(function (factory) {
     'use strict';
     if (typeof define === 'function' && define.amd) {
         // Register as an anonymous AMD module:

+ 1 - 1
app/Resources/public/assets/jquery-file-upload/js/jquery.fileupload-process.js

@@ -12,7 +12,7 @@
 /* jshint nomen:false */
 /* global define, require, window */
 
-(function (factory) {
+;(function (factory) {
     'use strict';
     if (typeof define === 'function' && define.amd) {
         // Register as an anonymous AMD module:

+ 1 - 1
app/Resources/public/assets/jquery-file-upload/js/jquery.fileupload-ui.js

@@ -12,7 +12,7 @@
 /* jshint nomen:false */
 /* global define, require, window */
 
-(function (factory) {
+;(function (factory) {
     'use strict';
     if (typeof define === 'function' && define.amd) {
         // Register as an anonymous AMD module:

+ 1 - 1
app/Resources/public/assets/jquery-file-upload/js/jquery.fileupload-validate.js

@@ -11,7 +11,7 @@
 
 /* global define, require, window */
 
-(function (factory) {
+;(function (factory) {
     'use strict';
     if (typeof define === 'function' && define.amd) {
         // Register as an anonymous AMD module:

+ 1 - 1
app/Resources/public/assets/jquery-file-upload/js/jquery.fileupload-video.js

@@ -12,7 +12,7 @@
 /* jshint nomen:false */
 /* global define, require, window, document */
 
-(function (factory) {
+;(function (factory) {
     'use strict';
     if (typeof define === 'function' && define.amd) {
         // Register as an anonymous AMD module:

+ 1 - 1
app/Resources/public/assets/jquery-file-upload/js/jquery.fileupload.js

@@ -12,7 +12,7 @@
 /* jshint nomen:false */
 /* global define, require, window, document, location, Blob, FormData */
 
-(function (factory) {
+;(function (factory) {
     'use strict';
     if (typeof define === 'function' && define.amd) {
         // Register as an anonymous AMD module:

+ 1 - 1
app/Resources/public/assets/jquery-file-upload/js/jquery.iframe-transport.js

@@ -11,7 +11,7 @@
 
 /* global define, require, window, document */
 
-(function (factory) {
+;(function (factory) {
     'use strict';
     if (typeof define === 'function' && define.amd) {
         // Register as an anonymous AMD module:

+ 4 - 4
app/Resources/public/assets/mediaelement/.bower.json

@@ -23,12 +23,12 @@
     "./build/mediaelement-and-player.js",
     "./build/mediaelementplayer.css"
   ],
-  "version": "2.21.1",
-  "_release": "2.21.1",
+  "version": "2.21.2",
+  "_release": "2.21.2",
   "_resolution": {
     "type": "version",
-    "tag": "2.21.1",
-    "commit": "701dfeac106ae8373e4d14819f8b8bbf22c52f43"
+    "tag": "2.21.2",
+    "commit": "47e85a3cb8f7d0a61d99c8d36b151b1a16b01112"
   },
   "_source": "https://github.com/johndyer/mediaelement.git",
   "_target": "2.*",

+ 2 - 2
app/Resources/public/assets/mediaelement/build/mediaelement-and-player.js

@@ -16,7 +16,7 @@
 var mejs = mejs || {};
 
 // version number
-mejs.version = '2.21.1'; 
+mejs.version = '2.21.2'; 
 
 
 // player number (for missing, same id attr)
@@ -1448,7 +1448,7 @@ mejs.HtmlMediaElementShim = {
 					specialIEContainer.outerHTML =
 '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" ' +
 'id="' + pluginid + '" width="' + width + '" height="' + height + '" class="mejs-shim">' +
-'<param name="movie" value="' + options.pluginPath + options.flashName + '?x=' + (new Date().getTime()) + '" />' +
+'<param name="movie" value="' + options.pluginPath + options.flashName + '?' + (new Date().getTime()) + '" />' +
 '<param name="flashvars" value="' + initVars.join('&amp;') + '" />' +
 '<param name="quality" value="high" />' +
 '<param name="bgcolor" value="#000000" />' +

File diff suppressed because it is too large
+ 0 - 0
app/Resources/public/assets/mediaelement/build/mediaelement-and-player.min.js


+ 2 - 2
app/Resources/public/assets/mediaelement/build/mediaelement.js

@@ -16,7 +16,7 @@
 var mejs = mejs || {};
 
 // version number
-mejs.version = '2.21.1'; 
+mejs.version = '2.21.2'; 
 
 
 // player number (for missing, same id attr)
@@ -1448,7 +1448,7 @@ mejs.HtmlMediaElementShim = {
 					specialIEContainer.outerHTML =
 '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" ' +
 'id="' + pluginid + '" width="' + width + '" height="' + height + '" class="mejs-shim">' +
-'<param name="movie" value="' + options.pluginPath + options.flashName + '?x=' + (new Date().getTime()) + '" />' +
+'<param name="movie" value="' + options.pluginPath + options.flashName + '?' + (new Date().getTime()) + '" />' +
 '<param name="flashvars" value="' + initVars.join('&amp;') + '" />' +
 '<param name="quality" value="high" />' +
 '<param name="bgcolor" value="#000000" />' +

File diff suppressed because it is too large
+ 0 - 0
app/Resources/public/assets/mediaelement/build/mediaelement.min.js


+ 5 - 1
app/Resources/public/assets/mediaelement/changelog.md

@@ -1,5 +1,9 @@
 ### Version History
 
+*2.21.2 (2016/05/08)*
+
+* Fixed IE8 compatibility with new security update
+
 *2.21.1 (2016/05/06)*
 
 * Fix YouTube embed functionality from 2.21.0 plugin handling updates @johndyer
@@ -8,6 +12,7 @@
 
 *2.21.0 (2016/05/05)*
 
+* Simplified plugin callback functions and querystring checking (security update) @johndyer
 * Removed Chrome iframe fullscreen fix (https://github.com/johndyer/mediaelement/pull/1736) @13twelve
 * Detect YouTube scheme (https://github.com/johndyer/mediaelement/pull/1730) @silkentrance 
 * Handle keydown events only for focused mediaelement (https://github.com/johndyer/mediaelement/pull/1732) @lucash
@@ -18,7 +23,6 @@
 * Support for VAST3 adpods (https://github.com/johndyer/mediaelement/pull/1702) @cherylquirion
 * Allow progress to follow configuration (https://github.com/johndyer/mediaelement/pull/1703) @tennety
 * YouTube: poster hiding and multi-pause issues (https://github.com/johndyer/mediaelement/pull/1719) @msant7
-* Simplified plugin callback functions and querystring checking @johdneyr
 * Fix for timerail when duration is over 1 hour  #1727 @johndyer
 
 *2.19.1 (2016/02/26)*

+ 5 - 5
app/Resources/public/assets/webcamjs/.bower.json

@@ -1,6 +1,6 @@
 {
   "name": "webcamjs",
-  "version": "1.0.6",
+  "version": "1.0.9",
   "homepage": "https://github.com/jhuckaby/webcamjs",
   "authors": [
     "Joseph Huckaby <jhuckaby@gmail.com>"
@@ -21,13 +21,13 @@
     "demos",
     "flash"
   ],
-  "_release": "1.0.6",
+  "_release": "1.0.9",
   "_resolution": {
     "type": "version",
-    "tag": "v1.0.6",
-    "commit": "d111e71268e6025db0c0eb3bb44194443105dff6"
+    "tag": "v1.0.9",
+    "commit": "95609edd8390da09e3cf808ab2b48d7996a155bb"
   },
-  "_source": "git://github.com/jhuckaby/webcamjs.git",
+  "_source": "https://github.com/jhuckaby/webcamjs.git",
   "_target": "1.0.*",
   "_originalSource": "webcamjs"
 }

+ 6 - 6
app/Resources/public/assets/webcamjs/README.md

@@ -10,7 +10,7 @@ Looking for a good alternative to WebcamJS?  Please check out [JpegCamera](https
 
 Google Chrome has made it a strict requirement that your website be secure (HTTPS) if you want to access the camera.  This change is live in Chrome version 47 and up.  So basically, if you want to use WebcamJS, you will need to host your website with SSL / HTTPS.  The only alternative is to force Flash fallback mode on Chrome, which is probably not desirable.
 
-See the Chromium docs for details: [https://www.chromium.org/Home/chromium-security/prefer-secure-origins-for-powerful-new-features]
+See this Chromium page for details: [https://www.chromium.org/Home/chromium-security/prefer-secure-origins-for-powerful-new-features](https://www.chromium.org/Home/chromium-security/prefer-secure-origins-for-powerful-new-features)
 
 Note that you do not need HTTPS for localhost / 127.0.0.1.  Here is the list of rules for Chrome which unlock the camera:
 
@@ -31,7 +31,7 @@ WebcamJS has been tested on the following browsers / operating systems:
 
 | OS | Browser | Notes |
 |----|---------|-------|
-| Mac OS X | Chrome 30+ | Works |
+| Mac OS X | Chrome 30+ | Works -- **Chrome 47+ requires HTTPS** |
 | Mac OS X | Firefox 20+ | Works |
 | Mac OS X | Safari 6+ | **Requires Adobe Flash Player** |
 | Windows | Chrome 30+ | Works -- **Chrome 47+ requires HTTPS** |
@@ -107,7 +107,8 @@ If you want to override the default settings, just call `Webcam.set()` and pass
 | `force_flash` | false | Setting this to true will always run in Adobe Flash fallback mode. |
 | `flip_horiz` | false | Setting this to true will flip the image horizontally (mirror mode). |
 | `fps` | 30 | Set the desired fps (frames per second) capture rate. |
-
+| `swfURL` | "./webcam.swf" | Set an alternate location for the Adobe Flash fallback SWF file
+| `flashNotDetectedText` | "ERROR: No Adobe Flash Player detected.  Webcam.js relies on Flash for browsers that do not support getUserMedia (like yours)." | text/html for flash player not detected.
 Here is an example of overriding some parameters.  Remember to call this *before* you attach the viewer.
 
 ```javascript
@@ -155,7 +156,7 @@ Your function is also passed a HTML5 Canvas and a 2D Context object, so you can
 ```javascript
 	Webcam.snap( function(data_uri, canvas, context) {
 		// copy image to my own canvas
-		myContext.drawImage( context, 0, 0 );
+		myContext.drawImage( canvas, 0, 0 );
 	} );
 ```
 
@@ -245,7 +246,7 @@ The idea here is to provide a photo-booth-like experience, where the user can ta
 By default WebcamJS looks for the SWF file in the same directory as the JS file.  If you are hosting the SWF in a different location, please set it using the `Webcam.setSWFLocation()` function.  It should be on the same domain as your page.  Example:
 
 ```javascript
-	Webcam.setSWFLocation("/path/to/the/webcam.swf");
+	Webcam.set("swfURL", "/path/to/the/webcam.swf");
 ```
 
 Note that this is only used if the user's browser doesn't support HTML5 getUserMedia, and WebcamJS has to fallback to using an Adobe Flash movie to capture the camera.
@@ -269,7 +270,6 @@ Here is a list of all the API function calls available in the WebcamJS library.
 | `Webcam.set()` | Set configuration parameters.  Pass a key + value, or a hash with multiple keys/values. |
 | `Webcam.on()` | Register an event listener for a given event.  Pass in the event name, and a callback function. |
 | `Webcam.off()` | Remove an event listener for a given event.  Pass in the event name, and the callback function to remove.  Omit the callback reference to remove *all* listeners. |
-| `Webcam.setSWFLocation()` | Set an alternate location for the Adobe Flash fallback SWF file (defaults to JS location). |
 | `Webcam.attach()` | Initialize library and attach live camera to specified DOM object. |
 | `Webcam.reset()` | Shut down library and reset everything.  Must call `attach()` to use it again.  Does not remove event listeners. |
 | `Webcam.freeze()` | Freeze the current live camera frame, allowing the user to preview before saving. |

+ 1 - 1
app/Resources/public/assets/webcamjs/bower.json

@@ -1,6 +1,6 @@
 {
   "name": "webcamjs",
-  "version": "1.0.6",
+  "version": "1.0.9",
   "homepage": "https://github.com/jhuckaby/webcamjs",
   "authors": [
     "Joseph Huckaby <jhuckaby@gmail.com>"

+ 1 - 1
app/Resources/public/assets/webcamjs/package.json

@@ -1,6 +1,6 @@
 {
 	"name": "webcamjs",
-	"version": "1.0.6",
+	"version": "1.0.9",
 	"description": "HTML5 Webcam Image Capture Library with Flash Fallback",
 	"author": "Joseph Huckaby <jhuckaby@gmail.com>",
 	"homepage": "https://github.com/jhuckaby/webcamjs",

+ 88 - 34
app/Resources/public/assets/webcamjs/webcam.js

@@ -1,4 +1,4 @@
-// WebcamJS v1.0.6
+// WebcamJS v1.0.9
 // Webcam library for capturing JPEG/PNG images in JavaScript
 // Attempts getUserMedia, falls back to Flash
 // Author: Joseph Huckaby: http://github.com/jhuckaby
@@ -7,13 +7,37 @@
 // Licensed under the MIT License
 
 (function(window) {
+var _userMedia;
+
+// declare error types
+
+// inheritance pattern here:
+// https://stackoverflow.com/questions/783818/how-do-i-create-a-custom-error-in-javascript
+function FlashError() {
+	var temp = Error.apply(this, arguments);
+	temp.name = this.name = "FlashError";
+	this.stack = temp.stack;
+	this.message = temp.message;
+}
+
+function WebcamError() {
+	var temp = Error.apply(this, arguments);
+	temp.name = this.name = "WebcamError";
+	this.stack = temp.stack;
+	this.message = temp.message;
+}
+
+IntermediateInheritor = function() {};
+IntermediateInheritor.prototype = Error.prototype;
+
+FlashError.prototype = new IntermediateInheritor();
+WebcamError.prototype = new IntermediateInheritor();
 
 var Webcam = {
-	version: '1.0.6',
+	version: '1.0.8',
 	
 	// globals
 	protocol: location.protocol.match(/https/i) ? 'https' : 'http',
-	swfURL: '',      // URI to webcam.swf movie (defaults to the js location)
 	loaded: false,   // true when webcam movie finishes loading
 	live: false,     // true when webcam is initialized and ready to snap
 	userMedia: true, // true when getUserMedia is supported natively
@@ -29,7 +53,14 @@ var Webcam = {
 		flip_horiz: false,     // flip image horiz (mirror mode)
 		fps: 30,               // camera frames per second
 		upload_name: 'webcam', // name of file in upload post data
-		constraints: null      // custom user media constraints
+		constraints: null,     // custom user media constraints,
+		swfURL: '',            // URI to webcam.swf movie (defaults to the js location)
+		flashNotDetectedText: 'ERROR: No Adobe Flash Player detected.  Webcam.js relies on Flash for browsers that do not support getUserMedia (like yours).'
+	},
+
+	errors: {
+		FlashError: FlashError,
+		WebcamError: WebcamError
 	},
 	
 	hooks: {}, // callback hook functions
@@ -73,7 +104,7 @@ var Webcam = {
 			elem = document.getElementById(elem) || document.querySelector(elem);
 		}
 		if (!elem) {
-			return this.dispatch('error', "Could not locate DOM element to attach to.");
+			return this.dispatch('error', new WebcamError("Could not locate DOM element to attach to."));
 		}
 		this.container = elem;
 		elem.innerHTML = ''; // start with empty element
@@ -87,12 +118,21 @@ var Webcam = {
 		if (!this.params.width) this.params.width = elem.offsetWidth;
 		if (!this.params.height) this.params.height = elem.offsetHeight;
 		
+		// make sure we have a nonzero width and height at this point
+		if (!this.params.width || !this.params.height) {
+			return this.dispatch('error', new WebcamError("No width and/or height for webcam.  Please call set() first, or attach to a visible element."));
+		}
+		
 		// set defaults for dest_width / dest_height if not set
 		if (!this.params.dest_width) this.params.dest_width = this.params.width;
 		if (!this.params.dest_height) this.params.dest_height = this.params.height;
 		
+		this.userMedia = _userMedia === undefined ? this.userMedia : _userMedia;
 		// if force_flash is set, disable userMedia
-		if (this.params.force_flash) this.userMedia = null;
+		if (this.params.force_flash) {
+			_userMedia = this.userMedia;
+			this.userMedia = null
+		}
 		
 		// check for default fps
 		if (typeof this.params.fps !== "number") this.params.fps = 30;
@@ -139,16 +179,18 @@ var Webcam = {
 			})
 			.then( function(stream) {
 				// got access, attach stream to video
+				video.onloadedmetadata = function(e) {
+					self.stream = stream;
+					self.loaded = true;
+					self.live = true;
+					self.dispatch('load');
+					self.dispatch('live');
+					self.flip();
+				};
 				video.src = window.URL.createObjectURL( stream ) || stream;
-				self.stream = stream;
-				self.loaded = true;
-				self.live = true;
-				self.dispatch('load');
-				self.dispatch('live');
-				self.flip();
 			})
 			.catch( function(err) {
-				return self.dispatch('error', "Could not access webcam: " + err.name + ": " + err.message, err);
+				return self.dispatch('error', err);
 			});
 		}
 		else {
@@ -200,7 +242,12 @@ var Webcam = {
 			delete this.stream;
 			delete this.video;
 		}
-		
+
+		if (this.userMedia !== true) {
+			// call for turn off camera in flash
+			this.getMovie()._releaseCamera();
+		}
+
 		if (this.container) {
 			this.container.innerHTML = '';
 			delete this.container;
@@ -271,16 +318,23 @@ var Webcam = {
 			return true;
 		}
 		else if (name == 'error') {
+			if ((args[0] instanceof FlashError) || (args[0] instanceof WebcamError)) {
+				message = args[0].message;
+			} else {
+				message = "Could not access webcam: " + args[0].name + ": " + 
+					args[0].message + " " + args[0].toString();
+			}
+
 			// default error handler if no custom one specified
-			alert("Webcam.js Error: " + args[0]);
+			alert("Webcam.js Error: " + message);
 		}
 		
 		return false; // no hook defined
 	},
-	
-	setSWFLocation: function(url) {
-		// set location of SWF movie (defaults to webcam.swf in cwd)
-		this.swfURL = url;
+
+	setSWFLocation: function(value) {
+		// for backward compatibility.
+		this.set('swfURL', value);
 	},
 	
 	detectFlash: function() {
@@ -315,22 +369,23 @@ var Webcam = {
 	
 	getSWFHTML: function() {
 		// Return HTML for embedding flash based webcam capture movie		
-		var html = '';
+		var html = '',
+			swfURL = this.params.swfURL;
 		
 		// make sure we aren't running locally (flash doesn't work)
 		if (location.protocol.match(/file/)) {
-			this.dispatch('error', "Flash does not work from local disk.  Please run from a web server.");
+			this.dispatch('error', new FlashError("Flash does not work from local disk.  Please run from a web server."));
 			return '<h3 style="color:red">ERROR: the Webcam.js Flash fallback does not work from local disk.  Please run it from a web server.</h3>';
 		}
 		
 		// make sure we have flash
 		if (!this.detectFlash()) {
-			this.dispatch('error', "Adobe Flash Player not found.  Please install from get.adobe.com/flashplayer and try again.");
-			return '<h3 style="color:red">ERROR: No Adobe Flash Player detected.  Webcam.js relies on Flash for browsers that do not support getUserMedia (like yours).</h3>';
+			this.dispatch('error', new FlashError("Adobe Flash Player not found.  Please install from get.adobe.com/flashplayer and try again."));
+			return '<h3 style="color:red">' + this.params.flashNotDetectedText + '</h3>';
 		}
 		
 		// set default swfURL if not explicitly set
-		if (!this.swfURL) {
+		if (!swfURL) {
 			// find our script tag, and use that base URL
 			var base_url = '';
 			var scpts = document.getElementsByTagName('script');
@@ -341,8 +396,8 @@ var Webcam = {
 					idx = len;
 				}
 			}
-			if (base_url) this.swfURL = base_url + '/webcam.swf';
-			else this.swfURL = 'webcam.swf';
+			if (base_url) swfURL = base_url + '/webcam.swf';
+			else swfURL = 'webcam.swf';
 		}
 		
 		// if this is the user's first visit, set flashvar so flash privacy settings panel is shown first
@@ -359,17 +414,17 @@ var Webcam = {
 		}
 		
 		// construct object/embed tag
-		html += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" type="application/x-shockwave-flash" codebase="'+this.protocol+'://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="'+this.params.width+'" height="'+this.params.height+'" id="webcam_movie_obj" align="middle"><param name="wmode" value="opaque" /><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="'+this.swfURL+'" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><param name="flashvars" value="'+flashvars+'"/><embed id="webcam_movie_embed" src="'+this.swfURL+'" wmode="opaque" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="'+this.params.width+'" height="'+this.params.height+'" name="webcam_movie_embed" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="'+flashvars+'"></embed></object>';
+		html += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" type="application/x-shockwave-flash" codebase="'+this.protocol+'://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="'+this.params.width+'" height="'+this.params.height+'" id="webcam_movie_obj" align="middle"><param name="wmode" value="opaque" /><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="'+swfURL+'" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><param name="flashvars" value="'+flashvars+'"/><embed id="webcam_movie_embed" src="'+swfURL+'" wmode="opaque" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="'+this.params.width+'" height="'+this.params.height+'" name="webcam_movie_embed" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="'+flashvars+'"></embed></object>';
 		
 		return html;
 	},
 	
 	getMovie: function() {
 		// get reference to movie object/embed in DOM
-		if (!this.loaded) return this.dispatch('error', "Flash Movie is not loaded yet");
+		if (!this.loaded) return this.dispatch('error', new FlashError("Flash Movie is not loaded yet"));
 		var movie = document.getElementById('webcam_movie_obj');
 		if (!movie || !movie._snap) movie = document.getElementById('webcam_movie_embed');
-		if (!movie) this.dispatch('error', "Cannot locate Flash movie in DOM");
+		if (!movie) this.dispatch('error', new FlashError("Cannot locate Flash movie in DOM"));
 		return movie;
 	},
 	
@@ -504,9 +559,9 @@ var Webcam = {
 		var self = this;
 		var params = this.params;
 		
-		if (!this.loaded) return this.dispatch('error', "Webcam is not loaded yet");
-		// if (!this.live) return this.dispatch('error', "Webcam is not live yet");
-		if (!user_callback) return this.dispatch('error', "Please provide a callback function or canvas to snap()");
+		if (!this.loaded) return this.dispatch('error', new WebcamError("Webcam is not loaded yet"));
+		// if (!this.live) return this.dispatch('error', new WebcamError("Webcam is not live yet"));
+		if (!user_callback) return this.dispatch('error', new WebcamError("Please provide a callback function or canvas to snap()"));
 		
 		// if we have an active preview freeze, use that
 		if (this.preview_active) {
@@ -611,12 +666,11 @@ var Webcam = {
 				// camera is live and ready to snap
 				this.live = true;
 				this.dispatch('live');
-				this.flip();
 				break;
 
 			case 'error':
 				// Flash error
-				this.dispatch('error', msg);
+				this.dispatch('error', new FlashError(msg));
 				break;
 
 			default:

File diff suppressed because it is too large
+ 0 - 1
app/Resources/public/assets/webcamjs/webcam.min.js


BIN
app/Resources/public/assets/webcamjs/webcam.swf


+ 147 - 133
app/Resources/public/css/base.css

@@ -9,29 +9,24 @@
         yannik.warnier@beeznest.com
     Version: 1.0
 */
-pre {
-    margin-top:50px !important;
-}
-html,body {
-  margin: 0;
-  padding: 0;
-  height: 100%;
+html{
+    position: relative;
+    min-height: 100%;
 }
-#page-wrap{
-  min-height: 100%;
-  margin-bottom: 0;
+body{
+    margin-bottom: 120px;
 }
-#page-wrap:after{
-  content: "";
-  display: block;
-  clear: both;
-}
-footer {
-  padding-top: 15px;
+/* Sticky footer style */
+.sticky-footer{
+    position: absolute;
+    bottom: 0;
+    width: 100%;
+    height: 120px;
 }
-footer #footer_right{
-  text-align: right;
+#content-section{
+    margin-bottom: 150px;
 }
+/* End Sticky footer style */
 select {
   width : auto;
 }
@@ -51,6 +46,7 @@ a.thumbnail:hover{
   -webkit-border-radius: 5px;
   text-align: justify;
 }
+
 .version-checking{
   padding: 10px;
   width: 100%;
@@ -71,7 +67,7 @@ a.thumbnail:hover{
     display: block;
     padding-bottom: 100%;
     overflow: hidden;
-    
+
 }
 .gallery .frame{
     background-color: #eeeeee;
@@ -128,6 +124,14 @@ a.thumbnail:hover{
   padding-top: 10px;
   margin-top: 5px;
 }
+#toolbar-admin.navbar{
+    margin-bottom: 0;
+    border-radius: 0;
+    border: none;
+}
+header{
+    padding-top: 20px;
+}
 .blackboard_show {
     float:left;
     position:absolute;
@@ -317,6 +321,12 @@ a.thumbnail:hover{
 #results .file_upload_highlight {
     background: #F4D364;
 }
+.work-action, .work-date, .work-title{
+    text-align: center;
+}
+.work-name{
+    padding-left: 10px;
+}
 .file_upload{
     position: relative;
 }
@@ -329,13 +339,13 @@ a.thumbnail:hover{
     background: none;
 }
 .file_upload_small{
-    line-height: 15px;
     border: 1px solid #AFDDE9;
     background: #D4E6F0;
     width: 100%;
+    border-radius: 5px;
+    padding-bottom: 5px;
 }
 .work_correction_file_upload {
-    height: 40px !important;
     margin-bottom: 5px;
     margin-top: 5px;
 }
@@ -2411,9 +2421,10 @@ table#skill_holder {
 .badges-sidebar{
     height: 250px;
 }
-/* ****************************************************
-                     END SKILL
- **************************************************** */
+.panel figure figcaption{
+    background: none;
+    text-align: center;
+}
 
 .skill_root {
     box-shadow: 2px 2px 19px #aaa;
@@ -2493,6 +2504,8 @@ table#skill_holder {
   padding-top: .5em;
   padding-bottom: .5em;
   width: auto;
+  font-size: 12px;
+  line-height: 16px;
 }
 .lp-add-item{
   display:block;
@@ -3011,31 +3024,6 @@ a.forum_group_link {
     border: 1px solid #ccc;
     margin-bottom:5px;
 }
-
-#hide_bar_template {
-    vertical-align: middle;
-    width: 10px;
-    display: inline;
-    float:left;
-    height: 100%;
-    padding-bottom: 90em;
-    margin-bottom: -90em;
-    cursor:pointer;
-    background-color:#eee;
-    margin-left: 4px !important;
-    background-image: url("../../main/img/hide0.png");
-    background-repeat: no-repeat;
-    background-position: center center;
-}
-
-.hide_bar_template_not_hide {
-    background-image: url("../../main/img/hide2.png") !important;
-}
-
-#hide_bar_template:hover {
-    background-color:#aaa;
-}
-
 .timeline-example {
     background-color: #FFFFFF;
     border: 1px solid #CCCCCC;
@@ -3141,7 +3129,6 @@ a.forum_group_link {
 .subnav .nav > li > .logout {
     padding-top:8px;
 }
-
 .subnav-fixed {
     position: fixed;
     top: 0px;
@@ -3153,12 +3140,7 @@ a.forum_group_link {
     -webkit-border-radius: 0;
     -moz-border-radius: 0;
     border-radius: 0;
-    /*-webkit-box-shadow: inset 0 1px 0 #fff, 0 1px 5px rgba(0,0,0,.1);
-        -moz-box-shadow: inset 0 1px 0 #fff, 0 1px 5px rgba(0,0,0,.1);
-            box-shadow: inset 0 1px 0 #fff, 0 1px 5px rgba(0,0,0,.1);
-    */
 }
-
 .doc_folder {
     margin-right:5px;
     margin-top:5px;
@@ -3194,7 +3176,6 @@ a.forum_group_link {
     padding-left: 25px;
     box-shadow:none;
 }
-
 .handle.expanded{
     background-image:  url('../../main/img/div_hide.gif');
     background-repeat: no-repeat;
@@ -3202,7 +3183,6 @@ a.forum_group_link {
     padding-left: 25px;
     box-shadow:none;
 }
-
 .collapsible .handle{
     background-image: url('../../main/img/div_hide.gif');
     background-repeat: no-repeat;
@@ -3210,7 +3190,6 @@ a.forum_group_link {
     padding-left: 25px;
     box-shadow:none;
 }
-
 .collapsible .handle.collapsed{
     background-image:  url('../../main/img/div_show.gif');
     background-repeat: no-repeat;
@@ -3226,7 +3205,6 @@ a.forum_group_link {
     padding-left: 25px;
     box-shadow:none;
 }
-
 .btn.show{
     border:none;
     border-radius: 0;
@@ -3241,7 +3219,6 @@ a.forum_group_link {
     background-position:center center;
     box-shadow:none;
 }
-
 .btn.hide{
     border:none;
     border-radius: 0;
@@ -3256,7 +3233,6 @@ a.forum_group_link {
     background-position:center center;
     box-shadow:none;
 }
-
 .btn.loading{
     border:none;
     border-radius: 0;
@@ -3280,7 +3256,6 @@ a.forum_group_link {
 .boot-tooltip {
     cursor: pointer;
 }
-
 /*
     link
 */
@@ -3383,7 +3358,6 @@ i.size-32.icon-new-note{
 .nav-list img {
     margin-right: 6px;
 }
-
 /* Only for Firefox */
 @-moz-document url-prefix() {
     select#question_type_hidden option {
@@ -3406,12 +3380,9 @@ i.size-32.icon-new-note{
     select#question_type_hidden option[value="14"] {background-image: url(../../main/img/icons/32/mcmagl.png);}
     select#question_type_hidden option[value="16"] {background-image: url(../../main/img/icons/32/calculated_answer.png);}
 }
-
-
 .btn-success.btn-install{
     float: right;
 }
-
 /*
  * work
  */
@@ -3490,7 +3461,6 @@ i.size-32.icon-new-work{
 #settings .panel:hover .admin-edit-block {
     display: block;
 }
-
 /***** Survey *****/
 #list-survey p{
   display: inline-block;
@@ -3965,32 +3935,12 @@ i.size-32.icon-new-work{
   height:20px;
   width: 70%;
 }
-
-
 .bottom_actions {
   display: block;
 }
 .bottom_actions .form-group{
   margin-bottom: 10px;
 }
-.bottom_actions_fixed {
-  position: fixed;
-  z-index: 9999;
-  bottom: 0;
-  left: 0px;
-  margin-bottom: 0px;
-  padding-top: 20px;
-  padding-bottom: 10px;
-  border-top: 1px solid #DCE4EC;
-  background: #ffffff;
-  background: -moz-linear-gradient(top, #ffffff 0%, #f6f6f6 47%, #ededed 100%);
-  background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(47%,#f6f6f6), color-stop(100%,#ededed));
-  background: -webkit-linear-gradient(top, #ffffff 0%,#f6f6f6 47%,#ededed 100%);
-  background: -o-linear-gradient(top, #ffffff 0%,#f6f6f6 47%,#ededed 100%);
-  background: -ms-linear-gradient(top, #ffffff 0%,#f6f6f6 47%,#ededed 100%);
-  background: linear-gradient(to bottom, #ffffff 0%,#f6f6f6 47%,#ededed 100%);
-  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#ededed',GradientType=0 );
-}
 .sessions-items{
   list-style: none;
   padding: 0;
@@ -4065,11 +4015,9 @@ ul.holder li.bit-box{
   -webkit-border-radius: 4px;
   -moz-border-radius: 4px;
 }
-
 #file-descrtiption.form-control{
   width: 80%;
 }
-
 .session-course-edit .control{
   padding-top: 2em;
   padding-bottom: 2em;
@@ -4140,7 +4088,6 @@ ul.holder li.bit-box{
   padding-left: 10px;
   margin-left: 0px;
 }
-
 .question_options label > input + div.thumbnail {
   padding: 10px;
   box-sizing: border-box;
@@ -4154,7 +4101,6 @@ ul.holder li.bit-box{
   background: linear-gradient(to bottom, #ffffff 0%,#f6f6f6 47%,#ededed 100%); /* W3C */
   filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#ededed',GradientType=0 ); /* IE6-9 */
 }
-
 .question_options label > input:checked + div.thumbnail {
   border: 2px solid #337AB7;
   -webkit-box-shadow: 0 4px 18px #C8C8C8;
@@ -4170,11 +4116,9 @@ ul.holder li.bit-box{
   background: linear-gradient(to bottom, #ffffff 0%,#fffef2 47%,#ffffe2 100%); /* W3C */
   filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#ffffe2',GradientType=0 ); /* IE6-9 */
 }
-
 .question_options div.thumbnail p {
   margin: 0;
 }
-
 .question_options div.thumbnail img {
   height: 150px !important;
   width: 190px !important;
@@ -4189,7 +4133,6 @@ ul.holder li.bit-box{
   display: block;
   height: auto !important;
 }
-
 /***    Draggable answer    ***/
 .question_options ul.exercise-draggable-answer{
   float: left;
@@ -4266,7 +4209,6 @@ ul.exercise-draggable-answer .touch-items:hover{
   font-size: 12px;
   cursor: pointer;
 }
-
 /***    Matching Draggable answer ***/
 .drag_question {
   min-height: 4em;
@@ -4929,7 +4871,6 @@ div#chat-remote-video video {
   margin-left: auto;
   margin-right: auto;
 }
-
 #session-list .information-item{
   padding: 10px;
   min-height: 185px;
@@ -5116,7 +5057,7 @@ div#chat-remote-video video {
   border: none;
 }
 .ui-jqgrid tr.jqgrow td{
-  height: 45px;
+  line-height: 22px;
   font-size: 13px;
 }
 .ui-jqgrid .ui-jqgrid-labels .ui-state-hover{
@@ -5160,8 +5101,6 @@ div#chat-remote-video video {
 .ui-tabs .ui-widget-content a.btn-success{
     color: #fff;
 }
-
-
 .ui-priority-secondary,
 .ui-widget-content .ui-priority-secondary,
 .ui-widget-header .ui-priority-secondary{
@@ -5180,6 +5119,7 @@ div#chat-remote-video video {
 }
 .ui-jqgrid .ui-jqgrid-htable th {
     height: 35px;
+    font-weight: bold;
 }
 .ui-jqgrid .ui-state-highlight, .ui-jqgrid .ui-widget-content .ui-state-highlight,.ui-jqgrid .ui-widget-header .ui-state-highlight{
   background: #F7F7F7;
@@ -5199,7 +5139,6 @@ div#chat-remote-video video {
 .ui-dialog .ui-dialog-buttonpane{
   border-top: 1px solid #DDD;
 }
-
 .ui-button.ui-widget.ui-state-default {
   background-color:#f5f5f5;
   background-image:-moz-linear-gradient(top,#fff,#e6e6e6);
@@ -5214,7 +5153,6 @@ div#chat-remote-video video {
   text-shadow:0 1px 1px rgba(255,255,255,.75);
   box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05)
 }
-
 .ui-button.ui-widget.ui-state-hover{
   border-width: 1px;
   border-style:solid;
@@ -5225,9 +5163,6 @@ div#chat-remote-video video {
   font-weight:normal;
   color:#333333;
 }
-
-
-
 .select2-container .select2-selection--single{
   height: 32px !important;
   border-color: #CCCCCC !important;
@@ -5409,24 +5344,19 @@ div#chat-remote-video video {
 .session-view-row {
   padding: 8px 0;
 }
-
 .session-view-lvl-2 {
   margin-left : 66px;
 }
-
 .session-view-lvl-3 {
   padding-left : 92px;
 }
-
 .session-view-lvl-4 {
   padding-left : 102px;
 }
-
 .session-view-lvl-5 {
   padding-left : 128px;
   font-weight : normal;
 }
-
 .session-view-lvl-6 {
   padding-left : 20px;
 }
@@ -5438,25 +5368,20 @@ div#chat-remote-video video {
 img.sessionView {
   margin-right: 10px;
 }
-
 a.sessionView {
   font-weight : bold;
 }
-
 .session-view-user-category {
   font-weight : bold;
   padding-bottom : 10px;
 }
-
 .session-view-session-category {
   font-weight : bold;
   padding-bottom : 10px;
 }
-
 .session-view-session {
   font-weight : bold;
 }
-
 /* Like the well class */
 .session-view-well {
   min-height: 20px;
@@ -5467,16 +5392,13 @@ a.sessionView {
   border-radius: 4px;
   box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.05) inset;
 }
-
 .session-view-button {
   border : none;
   min-width : 28px;
 }
-
 .view-by-session-link {
   min-height: 38px;
 }
-
 .view-by-session-teachers {
   display : none; /* change this if you want to display teachers name in this view */
   font-size : 10px;
@@ -5484,15 +5406,12 @@ a.sessionView {
   overflow-y: auto;
   max-height:50px;
 }
-
 .view-by-session-right-actions {
   float : right;
 }
-
 .view-by-session-right-actions img {
   width : 12px;
 }
-
 .session-view-session-go-to-course-in-session {
   font-size : 12px;
 }
@@ -5677,11 +5596,9 @@ a.sessionView {
 }
 #grad_left {
     left: 0;
-     /* background: url('../../main/img/timeline/grad_left.png') repeat-y; */
 }
 #grad_right {
     right: 0;
-    /* background: url('../../main/img/timeline/grad_right.png') repeat-y; */
 }
 #next,
 #prev {
@@ -5732,7 +5649,109 @@ a.sessionView {
     height: 144px;
     position: relative;
 }
-
+/*
+* Lesson scorm
+*/
+#subtab.tab-wrapper,
+#resource_tab.tab-wrapper .tab-content .tab-pane{
+    margin-top: 20px;
+}
+#resource_tab li a {
+    padding: 5px 10px;
+}
+#resource_tab li.lp_resource_element a{
+    padding: 5px;
+}
+/* Gravatar */
+#user_image_block img,
+#sn-avatar-one a.expand-image img{
+    width: 120px;
+}
+footer{
+    font-size: 12px;
+    padding-top: 10px;
+}
+.bottom_actions_fixed {
+  position: fixed;
+  z-index: 9999;
+  bottom: 0;
+  left: 0px;
+  margin-bottom: 0px;
+  padding-top: 20px;
+  padding-bottom: 10px;
+  border-top: 1px solid #DCE4EC;
+  background: #ffffff;
+  width: 100%;
+}
+#toolshortcuts_horizontal{
+    padding-top: 15px;
+    padding-bottom: 15px;
+    margin-bottom: 10px;
+    text-align: center;
+}
+#toolshortcuts_horizontal .items-icon{
+    padding: 0px;
+    display: inline-block;
+}
+#toolshortcuts_horizontal .items-icon img{
+    padding:5px;
+    border-radius:5px;
+    -webkit-box-shadow: 0 1px 3px #C8C8C8;
+    -opera-box-shadow: 0 1px 3px #C8C8C8;
+    -moz-box-shadow: 0 1px 3px #C8C8C8;
+    box-shadow: 0 1px 3px #C8C8C8;
+    border: 1px solid #e6e6e6;
+}
+#toolnav{
+    position: fixed;
+    left: 0;
+    top: 50px;
+    z-index: 2000;
+}
+#toolnavbox ul{
+    list-style: none;
+    padding: 0;
+    margin: 0;
+}
+#toolnavbox ul li{
+    height: 40px;
+    
+}
+#toolnavbox ul li a {
+	display: inline-block;
+    margin: 0;
+	color:#fff;
+	padding: 7px;
+	text-decoration: none;
+	-webkit-transition:all 500ms ease;
+	-o-transition:all 500ms ease;
+    transition:all 500ms ease;
+    width: 38px
+}
+#toolnavbox ul li a:hover {
+	padding: 5px 10px;
+}
+.btn-tool{
+    margin-bottom: 2px;
+}
+/* CSS BACKUP *****/
+.item-backup{
+    padding-top: 5px;
+    padding-bottom: 5px;
+    cursor: pointer;
+    cursor: hand;
+}
+.item-backup .title{
+    margin-left: 10px;
+    font-weight: bold;
+}
+.tool-backups-options{
+    padding-left: 5%;
+    padding-right: 5%;
+}
+.list-backups-options{
+    list-style: none;
+}
 /* CSS NEW TOP ******************************************************************************/
 /* CSS Responsive */
 @media (min-width: 1025px) and (max-width: 1200px) {
@@ -5786,7 +5805,7 @@ a.sessionView {
 }
 /* Landscape phones and down */
 @media only screen and (min-device-width : 320px) and (max-device-width : 480px) {
-  
+
   #learning_path_breadcrumb_zone {
   }
   #learning_path_main{
@@ -5861,7 +5880,7 @@ a.sessionView {
   #show_graph{
    text-align: center;
   }
-  
+
 }
 @media (min-width : 480px) and (max-width: 767px) {
   #touch-button{
@@ -5909,7 +5928,7 @@ a.sessionView {
 }
 @media (min-width:320px) and (max-width: 479px){
     footer {
-        height: 12em;
+        
         padding-top: 15px;
     }
     footer #footer_right{
@@ -5936,21 +5955,16 @@ a.sessionView {
         margin: -2.5px -15px;
     }
 }
-
 .elfinder-cwd-filename {
     color: black !important;
 }
-
 .skill-badge-img{
     width: 150px;
     overflow: hidden;
 }
-
 .text-light{
     color: #00CCFF;
 }
-
-
 #dropzone {
     position: relative;
     overflow: hidden;
@@ -5971,4 +5985,4 @@ a.sessionView {
     border: 2px dashed #bbbbbb;
     font-size: 120%;
     margin-bottom: 0;
-}
+}

File diff suppressed because it is too large
+ 0 - 11
app/Resources/public/css/csshover3.htc


+ 4 - 2
app/Resources/public/css/scorm.css

@@ -16,7 +16,10 @@ See https://support.chamilo.org/issues/6976
 #scorm-info.panel-default{
 
 }
-
+.audio-scorm #container{
+    min-height: 45px;
+    margin-bottom: 5px;
+}
 #author_image {
   border: 1px solid #CCCCCC;
   float: left;
@@ -365,7 +368,6 @@ See https://support.chamilo.org/issues/6976
     height: 100%;
     margin: 0;
     overflow: hidden;
-    position: relative;
 }
 
 #learning_path_left_zone,

+ 2 - 3
app/Resources/public/css/themes/chamilo/default.css

@@ -56,7 +56,7 @@ a:focus {
   overflow: hidden !important;
 }
 .navbar-default {
-  background: #1D5591;
+  background: #337AB7;
   -webkit-box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
   box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
 }
@@ -68,7 +68,7 @@ a:focus {
 .navbar-default .navbar-nav > .active > a:hover,
 .navbar-default .navbar-nav > .active > a:focus{
   color: #fff;
-  background-color:#18477A;
+  background-color:#2C5B8E;
 }
 .navbar-default .navbar-nav > li > a{
   color: #ffffff;
@@ -141,7 +141,6 @@ a:focus {
 /* End Jquery UI */
 footer{
   background-color:#1A2226;
-  border-top: 2px solid #D2D6DE;
 }
 footer{
   color: #ffffff;

+ 61 - 28
app/bootstrap.php.cache

@@ -412,6 +412,7 @@ return $headers;
 }
 namespace Symfony\Component\HttpFoundation
 {
+use Symfony\Component\HttpFoundation\Exception\ConflictingHeadersException;
 use Symfony\Component\HttpFoundation\Session\SessionInterface;
 class Request
 {
@@ -764,30 +765,27 @@ $ip = $this->server->get('REMOTE_ADDR');
 if (!$this->isFromTrustedProxy()) {
 return array($ip);
 }
-if (self::$trustedHeaders[self::HEADER_FORWARDED] && $this->headers->has(self::$trustedHeaders[self::HEADER_FORWARDED])) {
+$hasTrustedForwardedHeader = self::$trustedHeaders[self::HEADER_FORWARDED] && $this->headers->has(self::$trustedHeaders[self::HEADER_FORWARDED]);
+$hasTrustedClientIpHeader = self::$trustedHeaders[self::HEADER_CLIENT_IP] && $this->headers->has(self::$trustedHeaders[self::HEADER_CLIENT_IP]);
+if ($hasTrustedForwardedHeader) {
 $forwardedHeader = $this->headers->get(self::$trustedHeaders[self::HEADER_FORWARDED]);
 preg_match_all('{(for)=("?\[?)([a-z0-9\.:_\-/]*)}', $forwardedHeader, $matches);
-$clientIps = $matches[3];
-} elseif (self::$trustedHeaders[self::HEADER_CLIENT_IP] && $this->headers->has(self::$trustedHeaders[self::HEADER_CLIENT_IP])) {
-$clientIps = array_map('trim', explode(',', $this->headers->get(self::$trustedHeaders[self::HEADER_CLIENT_IP])));
+$forwardedClientIps = $matches[3];
+$forwardedClientIps = $this->normalizeAndFilterClientIps($forwardedClientIps, $ip);
+$clientIps = $forwardedClientIps;
 }
-$clientIps[] = $ip; $firstTrustedIp = null;
-foreach ($clientIps as $key => $clientIp) {
-if (preg_match('{((?:\d+\.){3}\d+)\:\d+}', $clientIp, $match)) {
-$clientIps[$key] = $clientIp = $match[1];
+if ($hasTrustedClientIpHeader) {
+$xForwardedForClientIps = array_map('trim', explode(',', $this->headers->get(self::$trustedHeaders[self::HEADER_CLIENT_IP])));
+$xForwardedForClientIps = $this->normalizeAndFilterClientIps($xForwardedForClientIps, $ip);
+$clientIps = $xForwardedForClientIps;
 }
-if (!filter_var($clientIp, FILTER_VALIDATE_IP)) {
-unset($clientIps[$key]);
-continue;
-}
-if (IpUtils::checkIp($clientIp, self::$trustedProxies)) {
-unset($clientIps[$key]);
-if (null === $firstTrustedIp) {
-$firstTrustedIp = $clientIp;
+if ($hasTrustedForwardedHeader && $hasTrustedClientIpHeader && $forwardedClientIps !== $xForwardedForClientIps) {
+throw new ConflictingHeadersException('The request has both a trusted Forwarded header and a trusted Client IP header, conflicting with each other with regards to the originating IP addresses of the request. This is the result of a misconfiguration. You should either configure your proxy only to send one of these headers, or configure Symfony to distrust one of them.');
 }
+if (!$hasTrustedForwardedHeader && !$hasTrustedClientIpHeader) {
+return $this->normalizeAndFilterClientIps(array(), $ip);
 }
-}
-return $clientIps ? array_reverse($clientIps) : array($firstTrustedIp);
+return $clientIps;
 }
 public function getClientIp()
 {
@@ -1317,6 +1315,26 @@ private function isFromTrustedProxy()
 {
 return self::$trustedProxies && IpUtils::checkIp($this->server->get('REMOTE_ADDR'), self::$trustedProxies);
 }
+private function normalizeAndFilterClientIps(array $clientIps, $ip)
+{
+$clientIps[] = $ip; $firstTrustedIp = null;
+foreach ($clientIps as $key => $clientIp) {
+if (preg_match('{((?:\d+\.){3}\d+)\:\d+}', $clientIp, $match)) {
+$clientIps[$key] = $clientIp = $match[1];
+}
+if (!filter_var($clientIp, FILTER_VALIDATE_IP)) {
+unset($clientIps[$key]);
+continue;
+}
+if (IpUtils::checkIp($clientIp, self::$trustedProxies)) {
+unset($clientIps[$key]);
+if (null === $firstTrustedIp) {
+$firstTrustedIp = $clientIp;
+}
+}
+}
+return $clientIps ? array_reverse($clientIps) : array($firstTrustedIp);
+}
 }
 }
 namespace Symfony\Component\HttpFoundation
@@ -1358,7 +1376,7 @@ const HTTP_REQUEST_URI_TOO_LONG = 414;
 const HTTP_UNSUPPORTED_MEDIA_TYPE = 415;
 const HTTP_REQUESTED_RANGE_NOT_SATISFIABLE = 416;
 const HTTP_EXPECTATION_FAILED = 417;
-const HTTP_I_AM_A_TEAPOT = 418; const HTTP_UNPROCESSABLE_ENTITY = 422; const HTTP_LOCKED = 423; const HTTP_FAILED_DEPENDENCY = 424; const HTTP_RESERVED_FOR_WEBDAV_ADVANCED_COLLECTIONS_EXPIRED_PROPOSAL = 425; const HTTP_UPGRADE_REQUIRED = 426; const HTTP_PRECONDITION_REQUIRED = 428; const HTTP_TOO_MANY_REQUESTS = 429; const HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE = 431; const HTTP_UNAVAILABLE_FOR_LEGAL_REASONS = 451;
+const HTTP_I_AM_A_TEAPOT = 418; const HTTP_MISDIRECTED_REQUEST = 421; const HTTP_UNPROCESSABLE_ENTITY = 422; const HTTP_LOCKED = 423; const HTTP_FAILED_DEPENDENCY = 424; const HTTP_RESERVED_FOR_WEBDAV_ADVANCED_COLLECTIONS_EXPIRED_PROPOSAL = 425; const HTTP_UPGRADE_REQUIRED = 426; const HTTP_PRECONDITION_REQUIRED = 428; const HTTP_TOO_MANY_REQUESTS = 429; const HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE = 431; const HTTP_UNAVAILABLE_FOR_LEGAL_REASONS = 451;
 const HTTP_INTERNAL_SERVER_ERROR = 500;
 const HTTP_NOT_IMPLEMENTED = 501;
 const HTTP_BAD_GATEWAY = 502;
@@ -1407,7 +1425,7 @@ public static $statusTexts = array(
 415 =>'Unsupported Media Type',
 416 =>'Range Not Satisfiable',
 417 =>'Expectation Failed',
-418 =>'I\'m a teapot', 422 =>'Unprocessable Entity', 423 =>'Locked', 424 =>'Failed Dependency', 425 =>'Reserved for WebDAV advanced collections expired proposal', 426 =>'Upgrade Required', 428 =>'Precondition Required', 429 =>'Too Many Requests', 431 =>'Request Header Fields Too Large', 451 =>'Unavailable For Legal Reasons', 500 =>'Internal Server Error',
+418 =>'I\'m a teapot', 421 =>'Misdirected Request', 422 =>'Unprocessable Entity', 423 =>'Locked', 424 =>'Failed Dependency', 425 =>'Reserved for WebDAV advanced collections expired proposal', 426 =>'Upgrade Required', 428 =>'Precondition Required', 429 =>'Too Many Requests', 431 =>'Request Header Fields Too Large', 451 =>'Unavailable For Legal Reasons', 500 =>'Internal Server Error',
 501 =>'Not Implemented',
 502 =>'Bad Gateway',
 503 =>'Service Unavailable',
@@ -1505,11 +1523,6 @@ public function send()
 {
 $this->sendHeaders();
 $this->sendContent();
-if (function_exists('fastcgi_finish_request')) {
-fastcgi_finish_request();
-} elseif ('cli'!== PHP_SAPI) {
-static::closeOutputBuffers(0, true);
-}
 return $this;
 }
 public function setContent($content)
@@ -2204,6 +2217,10 @@ if ($e instanceof InactiveScopeException && self::EXCEPTION_ON_INVALID_REFERENCE
 return;
 }
 throw $e;
+} catch (\Throwable $e) {
+unset($this->loading[$id]);
+unset($this->services[$id]);
+throw $e;
 }
 unset($this->loading[$id]);
 return $service;
@@ -2428,11 +2445,11 @@ protected $booted = false;
 protected $name;
 protected $startTime;
 protected $loadClassCache;
-const VERSION ='2.8.6';
-const VERSION_ID = 20806;
+const VERSION ='2.8.8';
+const VERSION_ID = 20808;
 const MAJOR_VERSION = 2;
 const MINOR_VERSION = 8;
-const RELEASE_VERSION = 6;
+const RELEASE_VERSION = 8;
 const EXTRA_VERSION ='';
 const END_OF_MAINTENANCE ='11/2018';
 const END_OF_LIFE ='11/2019';
@@ -2486,6 +2503,13 @@ if (false === $this->booted) {
 return;
 }
 if ($this->getHttpKernel() instanceof TerminableInterface) {
+if (!$this->debug) {
+if (function_exists('fastcgi_finish_request')) {
+fastcgi_finish_request();
+} elseif ('cli'!== PHP_SAPI) {
+Response::closeOutputBuffers(0, true);
+}
+}
 $this->getHttpKernel()->terminate($request, $response);
 }
 }
@@ -3137,6 +3161,7 @@ return parent::isFresh();
 namespace Symfony\Component\HttpKernel
 {
 use Symfony\Component\HttpKernel\Controller\ControllerResolverInterface;
+use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
 use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
 use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;
 use Symfony\Component\HttpKernel\Event\FilterControllerEvent;
@@ -3146,6 +3171,7 @@ use Symfony\Component\HttpKernel\Event\GetResponseEvent;
 use Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent;
 use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent;
 use Symfony\Component\HttpKernel\Event\PostResponseEvent;
+use Symfony\Component\HttpFoundation\Exception\ConflictingHeadersException;
 use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\HttpFoundation\RequestStack;
 use Symfony\Component\HttpFoundation\Response;
@@ -3167,6 +3193,9 @@ $request->headers->set('X-Php-Ob-Level', ob_get_level());
 try {
 return $this->handleRaw($request, $type);
 } catch (\Exception $e) {
+if ($e instanceof ConflictingHeadersException) {
+$e = new BadRequestHttpException('The request headers contain conflicting information regarding the origin of this request.', $e);
+}
 if (false === $catch) {
 $this->finishRequest($request, $type);
 throw $e;
@@ -3321,6 +3350,10 @@ $response = parent::handle($request, $type, $catch);
 $this->container->set('request', null,'request');
 $this->container->leaveScope('request');
 throw $e;
+} catch (\Throwable $e) {
+$this->container->set('request', null,'request');
+$this->container->leaveScope('request');
+throw $e;
 }
 $this->container->set('request', null,'request');
 $this->container->leaveScope('request');

+ 1 - 1
app/cache/.htaccess

@@ -12,7 +12,7 @@ echo '> PHP is using the following php.ini file:'.PHP_EOL;
 if ($iniPath) {
     echo_style('green', '  '.$iniPath);
 } else {
-    echo_style('warning', '  WARNING: No configuration file (php.ini) used by PHP!');
+    echo_style('yellow', '  WARNING: No configuration file (php.ini) used by PHP!');
 }
 
 echo PHP_EOL.PHP_EOL;

+ 1 - 2
app/config/mail.conf.dist.php

@@ -1,5 +1,4 @@
 <?php
-
 /**
  *	This file holds the configuration settings
  *	for phpmailer Class.
@@ -11,7 +10,7 @@ $platform_email['SMTP_FROM_EMAIL'] = (isset($administrator['email']) ? $administ
 $platform_email['SMTP_FROM_NAME'] = (isset($administrator['name']) ? $administrator['name'] : 'Admin');
 $platform_email['SMTP_HOST'] = 'localhost';
 $platform_email['SMTP_PORT'] = 25;
-$platform_email['SMTP_MAILER'] = IS_WINDOWS_OS ? 'smtp' : 'mail'; // mail, sendmail or smtp
+$platform_email['SMTP_MAILER'] = 'sendmail'; // mail, sendmail or smtp
 $platform_email['SMTP_AUTH'] = 0;
 $platform_email['SMTP_USER'] = '';
 $platform_email['SMTP_PASS'] = '';

+ 3 - 3
certificates/index.php

@@ -15,7 +15,7 @@ switch ($action) {
     case 'export':
         $hideExportLink = api_get_setting('hide_certificate_export_link');
         $hideExportLinkStudent = api_get_setting('hide_certificate_export_link_students');
-        if ($hideExportLink === 'true' || (api_is_student() && $hideExportLinkStudent === 'true') ) {
+        if ($hideExportLink === 'true' || (api_is_student() && $hideExportLinkStudent === 'true')) {
             api_not_allowed(true);
         }
 
@@ -33,8 +33,7 @@ switch ($action) {
             );
 
             $pdfParams['orientation'] = 'landscape';
-            $pageFormat = $pdfParams['orientation'] == 'landscape' ? 'A4-L' : 'A4';
-
+            $pageFormat = $pdfParams['orientation'] === 'landscape' ? 'A4-L' : 'A4';
             $userInfo = api_get_user_info($certificate->user_id);
             $pdfName = api_replace_dangerous_char(get_lang('Certificate') . ' ' . $userInfo['username']);
 
@@ -45,4 +44,5 @@ switch ($action) {
     default:
         // Show certificate HTML
         $certificate->show();
+        break;
 }

+ 2 - 2
cli-config.php

@@ -35,10 +35,10 @@ $dbParams = array(
 );
 
 $database->connect($dbParams, realpath(__DIR__).'/', realpath(__DIR__).'/');
-$entityManager = $database->getManager();
+$entityManager = $database::getManager();
 
 $helperSet = ConsoleRunner::createHelperSet($entityManager);
-$dialogHelper = new Symfony\Component\Console\Helper\DialogHelper();
+$dialogHelper = new Symfony\Component\Console\Helper\QuestionHelper();
 $helperSet->set($dialogHelper);
 
 return $helperSet;

+ 11 - 72
composer.json

@@ -45,70 +45,23 @@
 
         "twig/twig": "1.*",
         "twig/extensions": "~1.0",
-
-        "symfony/symfony": ">=2.8",
-        "symfony/intl": "^3.0",
-        "symfony/assetic-bundle": "~2.3",
-        "symfony/swiftmailer-bundle": "~2.3",
-        "symfony/monolog-bundle": "~2.4",
-
-        "sensio/distribution-bundle": "~5.0",
-        "sensio/framework-extra-bundle": "^3.0.2",
-        "sensio/generator-bundle": "~3.0",
-        "incenteev/composer-parameter-handler": "~2.0",
-
-        "jms/serializer-bundle": "~0.12",
-
         "doctrine/orm": "~2.4",
         "doctrine/dbal": "~2.4",
-        "doctrine/doctrine-bundle": "~1.5",
-        "doctrine/doctrine-migrations-bundle": "*@dev",
+
         "doctrine/migrations": "~1.0@dev",
-        "doctrine/doctrine-fixtures-bundle": "^2.3",
+        "symfony/doctrine-bridge": "~2.8",
+        "symfony/validator": "2.6.4",
+        "symfony/filesystem": "~2.8",
+        "symfony/security": "~2.8",
         "doctrine/data-fixtures": "~1.0@dev",
 
-        "symfony-cmf/routing-bundle": "~1.1",
-
         "knplabs/gaufrette": "~0.1.6",
-        "knplabs/knp-menu-bundle": "dev-master",
 
-        "sonata-project/easy-extends-bundle": "~2.1@dev",
-        "sonata-project/seo-bundle": "~2.0",
-        "sonata-project/doctrine-extensions": "~1@dev",
-        "sonata-project/intl-bundle": "~2.2@dev",
-        "sonata-project/admin-bundle": "~3.0",
-        "sonata-project/doctrine-orm-admin-bundle": "~3.0",
-        "sonata-project/notification-bundle": "~3.0",
-        "sonata-project/block-bundle": "~3.0",
-        "sonata-project/media-bundle": "~3.0",
-        "sonata-project/user-bundle": "~3.0",
-        "sonata-project/cache-bundle": "~2.1@dev",
-        "sonata-project/cache": "~1.0@dev",
-        "sonata-project/page-bundle": "~3.0",
-        "sonata-project/core-bundle": "~3.0",
-        "sonata-project/formatter-bundle": "~3.0",
-        "sonata-project/datagrid-bundle": "~2.2@dev",
-        "sonata-project/exporter": "~1.3@dev",
-        "sonata-project/timeline-bundle": "~3.0",
-        "sonata-project/classification-bundle": "~3.0",
-        "sonata-project/comment-bundle": "~3.0",
-        "sonata-project/sonata-composer": "dev-master",
-
-        "friendsofsymfony/comment-bundle": "~2.0@dev",
-
-        "stof/doctrine-extensions-bundle": "~1.0",
         "gedmo/doctrine-extensions": "~2.3",
-
+        "sonata-project/user-bundle": "~3.0",
         "toin0u/digitalocean": "dev-master",
 
-        "mopa/bootstrap-bundle": "~3.0",
-        "egeloen/ckeditor-bundle": "~4",
-        "helios-ag/fm-elfinder-bundle": "~6.0",
-        "friendsofsymfony/jsrouting-bundle": "~1.5",
-
         "michelf/php-markdown": "~1.4",
-        "knplabs/knp-markdown-bundle": "~1.2",
-
         "sabre/vobject": "~3.1",
 
         "emojione/emojione": "1.3.0",
@@ -121,7 +74,7 @@
         "aferrandini/phpqrcode": "1.0.1",
         "mpdf/mpdf": "6.1.*",
         "barryvdh/elfinder-builds": "2.1.0.3",
-        "jbroadway/urlify": "1.0.3-stable",
+        "jbroadway/urlify": "1.0.7-stable",
         "monolog/monolog": "~1.0",
 
         "ircmaxell/password-compat": "~1.0.4",
@@ -141,12 +94,10 @@
         "imagine/imagine": "0.6.2",
         "essence/essence": "^2.5",
         "jeroendesloovere/vcard": "^1.2",
-        "a2lix/translation-form-bundle": "~2.0",
         "knplabs/doctrine-behaviors": "~1.1",
-        "lunetics/locale-bundle": "^2.4",
-        "theodo-evolution/session-bundle": "1.0.*",
         "jimmiw/php-time-ago": "^0.4.11",
-        "phpoffice/phpword": "^0.12.1"
+        "phpoffice/phpword": "^0.12.1",
+        "facebook/php-sdk-v4" : "~5.0"
     },
     "require-dev": {
         "behat/behat": "@stable",
@@ -163,22 +114,10 @@
             "Chamilo\\CoreBundle\\Composer\\ScriptHandler::deleteOldFilesFrom19x"
         ],
         "post-install-cmd": [
-            "Chamilo\\CoreBundle\\Composer\\ScriptHandler::dumpCssFiles",
-            "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
-            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
-            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
-            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
-            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
-            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
+            "Chamilo\\CoreBundle\\Composer\\ScriptHandler::dumpCssFiles"
         ],
         "post-update-cmd": [
-            "Chamilo\\CoreBundle\\Composer\\ScriptHandler::dumpCssFiles",
-            "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
-            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
-            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
-            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
-            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
-            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
+            "Chamilo\\CoreBundle\\Composer\\ScriptHandler::dumpCssFiles"
         ]
     },
     "extra": {

+ 10 - 6
documentation/installation_guide.html

@@ -84,7 +84,7 @@ Chamilo is mainly a LMS running (the so called <span style="font-weight: bold;">
 <ul>
 <li><span style="font-weight: bold;">Apache 2.2+</span></li>
 <li><span style="font-weight: bold;">MySQL 5.1+ or MariaDB 5+</span></li>
-<li><span style="font-weight: bold;">PHP 5.4+ (5.6 recommended for greater efficiency) (support for PHP7 has not been thoroughly tested)</span></li>
+<li><span style="font-weight: bold;">PHP 5.4+ (5.6 recommended for greater efficiency) (support for PHP7 seems OK but not evaluated on high load setups just yet)</span></li>
 </ul>
 <br />
 
@@ -129,6 +129,7 @@ Before you start installing Chamilo LMS, you must understand that, because we pr
     <li>As an all-in-one package through an official provider, certified by the Chamilo Association</li>
     <li>As an installable solution from one of many hosting providers who support cPanel with Scriptaculous</li>
     <li>At your preferred hosting provider using remote installers like Installatron</li>
+    <li>Through a Docker container image</li>
     <li>On your own server, downloading and installing manually</li>
     <li>On your own computer, at home or at the office, just for testing or development</li>
 </ul>
@@ -328,6 +329,7 @@ Please note that if you (unluckily) upgraded from any of the 1.9 versions to 1.1
 
 <h3>3.2 Upgrading from Chamilo 1.9.x</h3>
 <ul>
+  <li> make sure you don't have tables from previous versions of Chamilo still hanging around. These can cause the upgrade to fail. In particular, tables from versions 1.8.* could have multiple tables for each course, resulting in many tables with the same prefix. Only tables without prefix or with a "c_" prefix exist in 1.9 and superior versions. Make sure none of these tables persist. Take a backup of your database (just in case) and delete these prefixed tables (drop table ...).</li>
   <li> check that you haven't left any customised stylesheet or image <span class="text-muted">(if you have, make sure you keep a copy on the side*)</span></li>
   <li> download the Chamilo 1.10 install package from the <a href="http://www.chamilo.org/download">Chamilo download page</a></li>
   <li> unzip the new files of Chamilo 1.10 over the files of the older version (or unzip the files in one folder and then copy the files from there to the older version's directory)</li>
@@ -335,6 +337,7 @@ Please note that if you (unluckily) upgraded from any of the 1.9 versions to 1.1
   <li> make sure "AllowOverride All" is present in your Apache configuration, as interpreting the .htaccess files is very important for Chamilo to work (note that the Order-Allow directive has been replaced by "Require all granted" in Apache 2.4)</li>
   <li> point your browser on your portal URL + main/install/</li>
   <li> click&nbsp;<span style="font-style: italic;">Install</span>, then choose <span style="font-style: italic;">Upgrade from 1.9.*</span></li>
+  <li> once your portal is upgraded, clean your app/cache/twig directory: delete all the contents *in* this directory (do NOT remove the directory itself, only its contents!). It will all be re-generated. You can also delete the contents of this directory through the "Archive directory cleanup" option in the "System" box of the Administration page.</li>
 </ul>
 
 <br />
@@ -360,7 +363,8 @@ Do not delete the previous Chamilo installation directory before installing
 the new one. The upgrade process should take care of all unrequired folders.</p>
 
     <h3>3.2 Upgrading from Chamilo 1.8.x</h3>
-    To upgrade from version of Chamilo prior to 1.9.0, you will need to first upgrade them to 1.9.10.2, then upgrade again (separately) to 1.10.x
+    To upgrade from version of Chamilo prior to 1.9.0, you will need to first upgrade them to 1.9.10.x, then upgrade again (separately) to 1.10.x.
+    You can find the 1.9.10.x packages here: <a href="https://github.com/chamilo/chamilo-lms/releases">https://github.com/chamilo/chamilo-lms/releases</a>
 
     <p></p>
 <h3>3.5 In both last cases</h3>
@@ -617,7 +621,7 @@ If you have issues with files taking a long time to download, make sure you reco
 <hr style="width: 100%; height: 2px;" />
 <h2><a name="15._Videoconference"></a>Videoconference</h2>
 <p>
-  Chamilo supports the connection to two different videoconference servers: BigBlueButton (versions 0.81 and 0.9) and OpenMeetings.<br />
+  Chamilo supports the connection to two different videoconference servers: BigBlueButton (versions 0.81, 0.9 and 1.0) and OpenMeetings.<br />
   While BigBlueButton seem easier to install, more clearly documented and more
   esthetically finished, some users have manifested that OpenMeetings
   consumes less bandwidth, is less restrictive in terms of running environments
@@ -772,9 +776,9 @@ If you have issues with files taking a long time to download, make sure you reco
     <li>Get into your Chamilo Git repository</li>
     <li>Make sure you have no additional elements that were not commited (git status/git stash)</li>
     <li>If you have issues, you can always save your code somewhere else and ask Git to put you exactly at the most recent 1.9.x stage ("git pull"/"git reset --hard origin/1.9.x")</li>
-    <li>Once you're sure you have a "clean" local Chamilo repository, create a 1.10.x branch with "git checkout -b 1.10.x"</li>
-    <li>In the new branch, download all code from the 1.10.x branch upstream: "git pull origin 1.10.x"</li>
-    <li>If you never used composer or used it only a few times in the past, you might need to update it (rm -rf ~/.composer/vendor; composer global require "fxp/composer-asset-plugin:1.0.3"; composer clear-cache) before trying the following command</li>
+    <li>Once you're sure you have a "clean" local Chamilo repository, create a 1.11.x branch with "git checkout -b 1.11.x"</li>
+    <li>In the new branch, download all code from the 1.11.x branch upstream: "git pull origin 1.11.x"</li>
+    <li>If you never used composer or used it only a few times in the past, you might need to update it (rm -rf ~/.composer/vendor; composer clear-cache) before trying the following command</li>
     <li>Update composer: "composer update" (you might need to give a Github token here)</li>
     <li>Change permissions on folders app, web, main/lang and main/default_course_document/images</li>
     <li>Go to your portal install page (main/install/) and follow the upgrade procedure</li>

+ 7 - 6
documentation/installation_guide_es_ES.html

@@ -295,13 +295,14 @@ Dado que se trata sólo de un cambio de versión menor  previa de Chamilo 1.10.*
 
 <h3>3.2 Actualizar desde Chamilo 1.9.x</h3>
 <ul>
+  <li>Asegúrese que ninguna tabla de una versión anterior (a la 1.9) exista en su base de datos. Estas tablas pueden causar errores durante el proceso de actualización hacia versiones superiores. En particular, las tablas de versiones 1.8.* y anteriores podían repetirse una vez por curso, resultando en una gran cantidad de tablas que compartían el mismo prefijo. Solo las tablas sin prefijo o con un prefijo "c_" son legítimas en Chamilo 1.9 y siguientes. Asegúrese de que ninguna de estas antiguas tablas persista. Tóme una copia de seguridad de la base de datos (por si a caso) y luego borre estas tablas con prefijo (drop table ...).</li>
   <li>Compruebe que no ha dejado ninguna hoja de estilo o imagen personalizada (si la tuviera, asegúrese de realizar una copia de respaldo*)</li>
   <li>Descargue el paquete de instalación de Chamilo 1.9 desde la página de descarga de Chamilo</li>
   <li>Descomprima los nuevos ficheros de Chamilo 1.9 sobre los ficheros de la antigua versión ( o descomprima en una carpeta y luego copie los archivos en el directorio de la versión antigua)</li>
-    <li>Asegúrese *por completo* que el archivo .htaccess de la versión 1.10 ha sido copiado en la raíz también</li>
-    <li>Asegúrese que "AllowOverride All" está presente en su configuración de Apache, ya que interpretar el archivo .htaccess es muy importante para que Chamilo funcione (ojo que la directiva Order-Allow ha sido remplazada por "Require all granted" en Apache 2.4)</li>
-    <li>Escriba en su navegador web la URL de su portal + main/install/</li>
-    <li>Elija su idioma y haga click sobre Actualizar desde 1.9.x</li>
+  <li>Asegúrese *por completo* que el archivo .htaccess de la versión 1.10 ha sido copiado en la raíz también</li>
+  <li>Asegúrese que "AllowOverride All" está presente en su configuración de Apache, ya que interpretar el archivo .htaccess es muy importante para que Chamilo funcione (ojo que la directiva Order-Allow ha sido remplazada por "Require all granted" en Apache 2.4)</li>
+  <li>Escriba en su navegador web la URL de su portal + main/install/</li>
+  <li>Elija su idioma y haga click sobre Actualizar desde 1.9.x</li>
 </ul>
 <p>
     * Los estilos e imágenes están ubicados en el directorio main/css o main/img.
@@ -319,8 +320,8 @@ Dado que se trata sólo de un cambio de versión menor  previa de Chamilo 1.10.*
 <br />
 
 <h3>3.3 Actualizar desde Chamilo o Dok€os 1.8.x</h3>
-Para actualizar desde una versión previa a la 1.9.0, deberá a partir de ahora primero actualizar a la versión 1.9.10.2, para luego actualizar de ahí a la 1.10.x.
-
+Para actualizar desde una versión previa a la 1.9.0, deberá a partir de ahora primero actualizar a la versión 1.9.10.x, para luego actualizar de ahí a la 1.10.x.
+Podrá encontrar una versión descargable de 1.9.10.x aquí: <a href="https://github.com/chamilo/chamilo-lms/releases">https://github.com/chamilo/chamilo-lms/releases</a>
 
 <h3>3.4 En ambos últimos casos</h3>
 

+ 4 - 2
documentation/installation_guide_fr_FR.html

@@ -386,6 +386,7 @@
 
             <h3>3.2 Mettre à jour depuis Chamilo 1.9.x</h3>
             <ul>
+                <li> assurez-vous qu'aucune table ne persiste d'une version antérieure de Chamilo. Ces tables peuvent en effet causer une erreur durant la mise à jour. En particulier, les tables des versions 1.8.* et antérieures pouvaient se répéter une fois par cours, résultant en un grand nombre de tables partageant le même préfixe. Seules les tables sans préfixe ou avec un préfixe "c_" sont légitimes dans les versions 1.9 et supérieures. Assurez-vous qu'aucune de ces anciennes tables ne persiste. Prenez une copie de sauvegarde de votre base de données (au cas où) puis supprimez-les (drop table ...).</li>
                 <li> vérifiez que vous n'avez pas laissé de feuille de style personnalisée ou d'image <span class="text-muted">(le cas échant, faites-en une sauvegarde*)</span></li>
                 <li> télécharger le paquet Chamilo 1.10 depuis la <a href="http://www.chamilo.org/download">page de téléchargement de Chamilo</a></li>
                 <li> décompressez les nouveaux fichiers de Chamilo 1.10 sur les fichiers de votre ancienne installation (ou décompressez les dans un nouveau dossier et copier les fichiers extraits sur les anciens fichiers).</li>
@@ -420,8 +421,9 @@
             </p>
 
             <h3>3.3 Mettre à jour depuis Chamilo 1.8.x</h3>
-            Pour mettre à jour depuis une version antérieure à la 1.9.0, vous devrez commencer par la mettre à jour vers la version 1.9.10.2,
-            et seulement alors mettre à jours vers la 1.10.x
+            Pour mettre à jour depuis une version antérieure à la 1.9.0, vous devrez commencer par la mettre à jour vers la version 1.9.10.x,
+            et seulement alors mettre à jours vers la 1.10.x.
+            Vous pouvez trouver une version téléchargeable de 1.9.10.x ici: <a href="https://github.com/chamilo/chamilo-lms/releases">https://github.com/chamilo/chamilo-lms/releases</a>
             <p></p>
             <h3>3.4 Dans les deux derniers cas</h3>
 

+ 14 - 31
index.php

@@ -1,11 +1,12 @@
 <?php
 /* For licensing terms, see /license.txt */
 
+use ChamiloSession as Session;
+
 /**
  * @package chamilo.main
  */
 
-use \ChamiloSession as Session;
 define('CHAMILO_HOMEPAGE', true);
 define('CHAMILO_LOAD_WYSIWYG', false);
 
@@ -21,14 +22,9 @@ $this_section = SECTION_CAMPUS;
 
 $header_title = null;
 if (!api_is_anonymous()) {
-    $header_title = " ";
+    $header_title = ' ';
 }
 
-// Facebook connexion, if activated
-/*if (api_is_facebook_auth_activated() && !api_get_user_id()) {
-    facebookConnect();
-}
-*/
 $controller = new IndexManager($header_title);
 
 //Actions
@@ -39,17 +35,6 @@ if (!empty($_GET['logout'])) {
     $controller->logout($redirect);
 }
 
-
-/* Table definitions */
-
-/* Constants and CONFIGURATION parameters */
-/** @todo these configuration settings should move to the Chamilo config settings. */
-
-/** Defines wether or not anonymous visitors can see a list of the courses on the Chamilo homepage that are open to the world. */
-$_setting['display_courses_to_anonymous_users'] = 'true';
-
-/* LOGIN */
-
 /**
  * Registers in the track_e_default table (view in important activities in admin
  * interface) a possible attempted break in, sending auth data through get.
@@ -70,7 +55,7 @@ if (isset($_GET['submitAuth']) && $_GET['submitAuth'] == 1) {
 }
 
 // Delete session item necessary to check for legal terms
-if (api_get_setting('allow_terms_conditions') == 'true') {
+if (api_get_setting('allow_terms_conditions') === 'true') {
     Session::erase('term_and_condition');
 }
 //If we are not logged in and customapages activated
@@ -92,28 +77,26 @@ if (!api_get_user_id() && CustomPages::enabled()) {
 if (!empty($_POST['submitAuth'])) {
     // The user has been already authenticated, we are now to find the last login of the user.
     if (isset ($_user['user_id'])) {
-        $track_login_table      = Database :: get_main_table(TABLE_STATISTIC_TRACK_E_LOGIN);
-        $sql_last_login = "SELECT UNIX_TIMESTAMP(login_date)
-                                FROM $track_login_table
-                                WHERE login_user_id = '".$_user['user_id']."'
-                                ORDER BY login_date DESC LIMIT 1";
-        $result_last_login = Database::query($sql_last_login);
+        $track_login_table = Database :: get_main_table(TABLE_STATISTIC_TRACK_E_LOGIN);
+        $sql = "SELECT UNIX_TIMESTAMP(login_date)
+                FROM $track_login_table
+                WHERE login_user_id = '".$_user['user_id']."'
+                ORDER BY login_date DESC LIMIT 1";
+        $result_last_login = Database::query($sql);
         if (!$result_last_login) {
             if (Database::num_rows($result_last_login) > 0) {
                 $user_last_login_datetime = Database::fetch_array($result_last_login);
                 $user_last_login_datetime = $user_last_login_datetime[0];
-                Session::write('user_last_login_datetime',$user_last_login_datetime);
+                Session::write('user_last_login_datetime', $user_last_login_datetime);
             }
         }
-        //Event::event_login();
     }
-    // End login -- if ($_POST['submitAuth'])
 } else {
     // Only if login form was not sent because if the form is sent the user was already on the page.
     Event::event_open();
 }
 
-if (api_get_setting('display_categories_on_homepage') == 'true') {
+if (api_get_setting('display_categories_on_homepage') === 'true') {
     $controller->tpl->assign('course_category_block', $controller->return_courses_in_categories());
 }
 
@@ -164,7 +147,7 @@ $controller->tpl->assign('announcements_block', $announcements_block);
 $controller->tpl->assign('home_page_block', $controller->return_home_page());
 $controller->tpl->assign('navigation_course_links', $controller->return_navigation_links());
 $controller->tpl->assign('notice_block', $controller->return_notice());
-$controller->tpl->assign('main_navigation_block', $controller->return_navigation_links());
+//$controller->tpl->assign('main_navigation_block', $controller->return_navigation_links());
 $controller->tpl->assign('help_block', $controller->return_help());
 
 if (api_is_platform_admin() || api_is_drh()) {
@@ -180,7 +163,7 @@ if (isset($_GET['firstpage'])) {
     api_set_firstpage_parameter($_GET['firstpage']);
     // if we are already logged, go directly to course
     if (api_user_is_login()) {
-        echo "<script type='text/javascript'>self.location.href='index.php?firstpage=".Security::remove_XSS($_GET['firstpage'])."'</script>";
+        echo "<script>self.location.href='index.php?firstpage=".Security::remove_XSS($_GET['firstpage'])."'</script>";
     }
 } else {
     api_delete_firstpage_parameter();

Some files were not shown because too many files changed in this diff