diff --git a/app/Migrations/Schema/V111/Version111.php b/app/Migrations/Schema/V111/Version111.php index c1f216f8ad..93a54e860e 100644 --- a/app/Migrations/Schema/V111/Version111.php +++ b/app/Migrations/Schema/V111/Version111.php @@ -272,6 +272,7 @@ class Version111 extends AbstractMigrationChamilo $this->addSql('ALTER TABLE ticket_message_attachments ENGINE=InnoDB'); $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;'); $this->addSql('ALTER TABLE ticket_message_attachments ADD CONSTRAINT FK_70BF9E26700047D2 FOREIGN KEY (ticket_id) REFERENCES ticket_ticket (id);'); + $this->addSql('ALTER TABLE ticket_message_attachments ADD CONSTRAINT FK_70BF9E26537A1329 FOREIGN KEY (message_id) REFERENCES ticket_message (id);'); $this->addSql('CREATE INDEX IDX_70BF9E26700047D2 ON ticket_message_attachments (ticket_id);'); } else { $this->addSql('CREATE TABLE IF NOT EXISTS ticket_message_attachments (id INT AUTO_INCREMENT NOT NULL, ticket_id INT DEFAULT NULL, message_id INT DEFAULT NULL, path VARCHAR(255) NOT NULL, filename LONGTEXT NOT NULL, size INT NOT NULL, sys_insert_user_id INT NOT NULL, sys_insert_datetime DATETIME NOT NULL, sys_lastedit_user_id INT DEFAULT NULL, sys_lastedit_datetime DATETIME DEFAULT NULL, INDEX IDX_70BF9E26700047D2 (ticket_id), INDEX IDX_70BF9E26537A1329 (message_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB'); @@ -318,7 +319,6 @@ class Version111 extends AbstractMigrationChamilo $this->addSql('CREATE INDEX IDX_54B65868A76ED395 ON ticket_assigned_log (user_id);'); - $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);'); @@ -326,9 +326,6 @@ class Version111 extends AbstractMigrationChamilo $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);'); - if ($fixTableMessage) { - $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"'); } else { // Plugin was never installed. Create ticket tables @@ -403,7 +400,8 @@ class Version111 extends AbstractMigrationChamilo $this->addSql("ALTER TABLE session MODIFY COLUMN name VARCHAR(150) NOT NULL DEFAULT ''"); if (!$schema->hasTable('version')) { - $this->addSql('CREATE TABLE version (id int unsigned NOT NULL AUTO_INCREMENT, version varchar(255), PRIMARY KEY(id), UNIQUE(version));'); + $sql = getVersionTable(); + $this->addSql($sql); } if ($schema->hasTable('resource')) { diff --git a/composer.json b/composer.json index e82f9f3dec..2adb487ffc 100755 --- a/composer.json +++ b/composer.json @@ -43,7 +43,7 @@ } ], "require": { - "php": ">=5.4", + "php": ">=5.5", "ext-intl": "*", "ext-gd": "*", "ext-curl": "*", @@ -90,7 +90,6 @@ "ircmaxell/password-compat": "~1.0.4", "sylius/attribute": "0.13.0", "sylius/translation": "0.13.0", - "ramsey/array_column": "~1.1", "patchwork/utf8": "~1.2", "ddeboer/data-import": "@stable", "phpoffice/phpexcel": "~1.8", @@ -111,7 +110,8 @@ "essence/essence": "2.6.1", "pclzip/pclzip": "2.8.2", "chamilo/chash": "dev-master", - "ircmaxell/random-lib": "^1.2" + "ircmaxell/random-lib": "^1.2", + "ocramius/proxy-manager" : "~1.0|2.0.*" }, "require-dev": { "behat/behat": "@stable", diff --git a/documentation/changelog.html b/documentation/changelog.html index bc5e1d6249..2d755265fa 100755 --- a/documentation/changelog.html +++ b/documentation/changelog.html @@ -69,6 +69,7 @@
-Chamilo es fundamentalmente un LMS que se ejecuta con Apache (2.2+), MySQL 5.1+ (o MariaDB) y PHP 5.4+ (trilogía también llamada AMP). +Chamilo es fundamentalmente un LMS que se ejecuta con Apache (2.2+), MySQL 5.1+ (o MariaDB) y PHP 5.5+ (trilogía también llamada AMP).
Todo este software es software de código abierto y está disponible libremente.
diff --git a/documentation/installation_guide_fr_FR.html b/documentation/installation_guide_fr_FR.html
index 2ae81a5edd..b4d277299b 100644
--- a/documentation/installation_guide_fr_FR.html
+++ b/documentation/installation_guide_fr_FR.html
@@ -80,7 +80,7 @@
Chamilo est un système de gestion de l'apprentissage (LMS) qui fonctionne
principallement sur base d'un serveur web (Apache 2.2+), de MySQL 5.1+ ou de MariaDB 5+
- (5 ou 10) et de PHP 5.4+ (le support de PHP 7 n'a pas été pleinement testé).
+ (5 ou 10)
Chamilo può essere installato indifferentemente su server Windows, Linux, Mac OS X e Unix. Tuttavia raccomandiamo l’utilizzo di server Linux per sfruttarne al meglio le caratteristiche di flessibilità, controllo remoto e scalabilità.
Chamilo è principalmente un LMS (Learning Management System) che gira sulla piattaforma composta da Apache (1.3,2.0 or 2.2), MySQL 5.1 (o MariaDB) e PHP 5.4, 5.5 o 5.6, meglio nota come piattaforma AMP.
+Chamilo è principalmente un LMS (Learning Management System) che gira sulla piattaforma composta da Apache (1.3,2.0 or 2.2), MySQL 5.1 (o MariaDB) e PHP 5.5 o 5.6, meglio nota come piattaforma AMP.
Tutti questi software sono gratuiti e liberamente scaricabili.
'.get_lang('ThematicAdvanceHistory').' |
@@ -49,7 +49,7 @@ if ($history) {
$user_info = api_get_user_info();
if (isset($descriptions) && count($descriptions) > 0) {
- foreach ($descriptions as $id => $description) {
+ foreach ($descriptions as $id => $description) {
if (!empty($description)) {
$actions = '';
if (api_is_allowed_to_edit(null, true) && !$history) {
diff --git a/main/document/document_quota.php b/main/document/document_quota.php
index 8087ab1645..39267aa45f 100755
--- a/main/document/document_quota.php
+++ b/main/document/document_quota.php
@@ -1,5 +1,6 @@
['status', 'studentfollowup']);
$result = api_get_settings_params_simple($params);
+ $plugin = StudentFollowUpPlugin::create();
if (!empty($result) && $result['selected_value'] === 'installed') {
$navigation['follow_up']['url'] = api_get_path(WEB_PLUGIN_PATH).'studentfollowup/posts.php';
- $navigation['follow_up']['title'] = get_lang('MyDossier');
+ $navigation['follow_up']['title'] = $plugin->get_lang('CareDetailView');
$navigation['follow_up']['key'] = 'homepage';
$navigation['follow_up']['icon'] = 'homepage.png';
}
@@ -363,8 +364,7 @@ function return_navigation_array()
// Reports
if (!empty($possible_tabs['reports'])) {
if (api_get_setting('show_tabs', 'reports') == 'true') {
- if (
- (api_is_platform_admin() || api_is_drh() || api_is_session_admin())
+ if ((api_is_platform_admin() || api_is_drh() || api_is_session_admin())
&& Rights::hasRight('show_tabs:reports')
) {
$navigation['reports'] = $possible_tabs['reports'];
diff --git a/main/inc/lib/template.lib.php b/main/inc/lib/template.lib.php
index aea15044f0..f2c5ebca88 100755
--- a/main/inc/lib/template.lib.php
+++ b/main/inc/lib/template.lib.php
@@ -427,6 +427,7 @@ class Template
$show_course_navigation_menu = null;
if (!empty($this->course_id) && $this->user_is_logged_in) {
+
if (api_get_setting('show_toolshortcuts') != 'false') {
//Course toolbar
$show_course_shortcut = CourseHome::show_navigation_tool_shortcuts();
diff --git a/main/install/install.lib.php b/main/install/install.lib.php
index 3cbe625deb..d0b2815e67 100755
--- a/main/install/install.lib.php
+++ b/main/install/install.lib.php
@@ -2918,8 +2918,7 @@ function finishInstallation(
$files = $finder->files()->in($path);
// Needed for chash
- $sql = 'CREATE TABLE IF NOT EXISTS version (id int unsigned NOT NULL AUTO_INCREMENT, version varchar(255), PRIMARY KEY(id), UNIQUE(version));';
- Database::query($sql);
+ createVersionTable();
foreach ($files as $version) {
$version = str_replace(['Version', '.php'], '', $version->getFilename());
@@ -2928,6 +2927,24 @@ function finishInstallation(
}
}
+/**
+ * Creates 'version' table
+ */
+function createVersionTable()
+{
+ $sql = getVersionTable();
+ Database::query($sql);
+}
+
+/**
+ * Get version creation table query
+ * @return string
+ */
+function getVersionTable()
+{
+ return 'CREATE TABLE IF NOT EXISTS version (id int unsigned NOT NULL AUTO_INCREMENT, version varchar(20), PRIMARY KEY(id), UNIQUE(version));';
+}
+
/**
* Update settings based on installation profile defined in a JSON file
* @param string $installationProfile The name of the JSON file in main/install/profiles/ folder
diff --git a/main/lp/lp_upload.php b/main/lp/lp_upload.php
index 1e4cbb9f4b..173c759341 100755
--- a/main/lp/lp_upload.php
+++ b/main/lp/lp_upload.php
@@ -32,12 +32,10 @@ if (isset($_POST) && $is_error) {
);
return false;
unset($_FILES['user_file']);
-} else if ($_SERVER['REQUEST_METHOD'] == 'POST' && count($_FILES) > 0 && !empty($_FILES['user_file']['name'])) {
-
+} elseif ($_SERVER['REQUEST_METHOD'] == 'POST' && count($_FILES) > 0 && !empty($_FILES['user_file']['name'])) {
// A file upload has been detected, now deal with the file...
// Directory creation.
$stopping_error = false;
-
$s = $_FILES['user_file']['name'];
// Get name of the zip file without the extension.
@@ -47,7 +45,10 @@ if (isset($_POST) && $is_error) {
$file_base_name = str_replace('.'.$extension, '', $filename);
$new_dir = api_replace_dangerous_char(trim($file_base_name));
- $type = learnpath::get_package_type($_FILES['user_file']['tmp_name'], $_FILES['user_file']['name']);
+ $type = learnpath::get_package_type(
+ $_FILES['user_file']['tmp_name'],
+ $_FILES['user_file']['name']
+ );
$proximity = 'local';
if (!empty($_REQUEST['content_proximity'])) {
diff --git a/main/template/default/layout/show_header.tpl b/main/template/default/layout/show_header.tpl
index ade002ecdd..8871287c06 100755
--- a/main/template/default/layout/show_header.tpl
+++ b/main/template/default/layout/show_header.tpl
@@ -34,6 +34,11 @@
{% endif %}
{% include template ~ "/layout/page_header.tpl" %}
+{% if show_course_shortcut is not null %}
+
+{% endif %}