Minor - flint fixes

pull/2715/head
Julio Montoya 6 years ago
parent 70554fe65a
commit d8275d0cca
  1. 3
      main/course_progress/thematic_advance.php
  2. 3
      main/course_progress/thematic_plan.php
  3. 2
      main/document/upload.php
  4. 2
      main/inc/global.inc.php
  5. 4
      main/inc/lib/display.lib.php
  6. 2
      main/inc/lib/document.lib.php
  7. 2
      src/CoreBundle/Admin/ResourceNodeAdmin.php
  8. 3
      src/CoreBundle/Admin/ResourceRightAdmin.php
  9. 9
      src/CoreBundle/Migrations/Schema/V200/Version20.php
  10. 4
      src/CoreBundle/Migrations/Schema/V200/Version20181025064351.php
  11. 1
      src/CourseBundle/Admin/CourseRelUserAdmin.php
  12. 2
      src/CourseBundle/Entity/CDocument.php

@ -229,7 +229,6 @@ if ($action === 'thematic_advance_add' || $action === 'thematic_advance_edit') {
}
$formLayout = $form->returnForm();
} elseif ($action == 'thematic_advance_list') {
// thematic advance list
echo '<div class="actions">';
@ -267,4 +266,4 @@ $thematicLayout = $tpl->get_template('course_progress/thematic_advance.html.twig
$content = $tpl->fetch($thematicLayout);
$tpl->assign('content', $content);
$tpl->display_one_col_template();
$tpl->display_one_col_template();

@ -10,7 +10,6 @@ use ChamiloSession as Session;
*
* @package chamilo.course_progress
*/
$tpl = new Template(get_lang('ThematicControl'));
$toolbar = null;
$formLayout = null;
@ -182,5 +181,3 @@ $content = $tpl->fetch($thematicLayout);
$tpl->assign('content', $content);
$tpl->display_one_col_template();

@ -301,7 +301,7 @@ $defaults = [
$form->setDefaults($defaults);
$url = api_get_path(WEB_AJAX_PATH).
'document.ajax.php?'.api_get_cidreq().'&a=upload_file&curdirpath='.$path.'&directory_parent_id='. (int) ($_REQUEST['id'] ?? 0);
'document.ajax.php?'.api_get_cidreq().'&a=upload_file&curdirpath='.$path.'&directory_parent_id='.(int) ($_REQUEST['id'] ?? 0);
$multipleForm = new FormValidator(
'drag_drop',

@ -500,7 +500,7 @@ try {
// Forcing PclZip library to use a custom temporary folder.
//define('PCLZIP_TEMPORARY_DIR', api_get_path(SYS_ARCHIVE_PATH));
} catch (Exception $e) {
error_log($e->getMessage());/*
error_log($e->getMessage()); /*
var_dump($e->getMessage());
var_dump($e->getCode());
var_dump($e->getLine());

@ -145,7 +145,9 @@ class Display
public static function display_footer()
{
$contents = ob_get_contents();
if (ob_get_length()) ob_end_clean();
if (ob_get_length()) {
ob_end_clean();
}
$tpl = '@ChamiloTheme/Layout/layout_one_col.html.twig';
$response = new Response();
$params['content'] = $contents;

@ -1,8 +1,8 @@
<?php
/* For licensing terms, see /license.txt */
use Chamilo\CourseBundle\Entity\CDocument;
use Chamilo\CoreBundle\Entity\Resource\ResourceLink;
use Chamilo\CourseBundle\Entity\CDocument;
use Chamilo\UserBundle\Entity\User;
use ChamiloSession as Session;

@ -8,8 +8,6 @@ use Sonata\AdminBundle\Datagrid\DatagridMapper;
use Sonata\AdminBundle\Datagrid\ListMapper;
use Sonata\AdminBundle\Form\FormMapper;
use Sonata\AdminBundle\Form\Type\ModelAutocompleteType;
use Sonata\AdminBundle\Form\Type\ModelListType;
use Sonata\AdminBundle\Form\Type\ModelReferenceType;
use Sonata\AdminBundle\Form\Type\ModelType;
use Sonata\AdminBundle\Show\ShowMapper;

@ -7,9 +7,6 @@ use Sonata\AdminBundle\Admin\AbstractAdmin;
use Sonata\AdminBundle\Datagrid\DatagridMapper;
use Sonata\AdminBundle\Datagrid\ListMapper;
use Sonata\AdminBundle\Form\FormMapper;
use Sonata\AdminBundle\Form\Type\ModelAutocompleteType;
use Sonata\AdminBundle\Form\Type\ModelListType;
use Sonata\AdminBundle\Form\Type\ModelReferenceType;
use Sonata\AdminBundle\Form\Type\ModelType;
use Sonata\AdminBundle\Show\ShowMapper;

@ -35,12 +35,6 @@ class Version20 extends AbstractMigrationChamilo
$this->addSql('CREATE TABLE IF NOT EXISTS timeline__action (id INT AUTO_INCREMENT NOT NULL, verb VARCHAR(255) NOT NULL, status_current VARCHAR(255) NOT NULL, status_wanted VARCHAR(255) NOT NULL, duplicate_key VARCHAR(255) DEFAULT NULL, duplicate_priority INT DEFAULT NULL, created_at DATETIME NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;');
$this->addSql('CREATE TABLE IF NOT EXISTS timeline__action_component (id INT AUTO_INCREMENT NOT NULL, action_id INT DEFAULT NULL, component_id INT DEFAULT NULL, type VARCHAR(255) NOT NULL, text VARCHAR(255) DEFAULT NULL, INDEX IDX_6ACD1B169D32F035 (action_id), INDEX IDX_6ACD1B16E2ABAFFF (component_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;');
$this->addSql('CREATE TABLE IF NOT EXISTS 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(190) 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 IF NOT EXISTS 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(190) 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 IF NOT EXISTS 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;');
@ -219,7 +213,6 @@ class Version20 extends AbstractMigrationChamilo
$this->addSql('UPDATE user SET created_at = registration_date WHERE CAST(created_at AS CHAR(20)) = "0000-00-00 00:00:00"');
$this->addSql('UPDATE user SET updated_at = registration_date WHERE CAST(updated_at AS CHAR(20)) = "0000-00-00 00:00:00"');
/*$table = $schema->getTable('course_rel_class');
if (!$table->hasColumn('c_id')) {
$this->addSql("ALTER TABLE course_rel_class ADD c_id int NOT NULL");
@ -523,8 +516,6 @@ class Version20 extends AbstractMigrationChamilo
$this->addSql('CREATE TABLE IF NOT EXISTS tool (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) NOT NULL, image VARCHAR(255) DEFAULT NULL, description LONGTEXT DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;');
$this->addSql('CREATE TABLE IF NOT EXISTS tool_resource_right (id INT AUTO_INCREMENT NOT NULL, tool_id INT DEFAULT NULL, role VARCHAR(255) NOT NULL, mask INT NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;');
$this->addSql('CREATE TABLE classification__tag (id INT AUTO_INCREMENT NOT NULL, context VARCHAR(255) DEFAULT NULL, name VARCHAR(255) NOT NULL, enabled TINYINT(1) NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, slug VARCHAR(190) NOT NULL, UNIQUE INDEX UNIQ_CA57A1C7989D9B62 (slug), INDEX IDX_CA57A1C7E25D857E (context), UNIQUE INDEX tag_context (slug, context), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB ROW_FORMAT = DYNAMIC;');
$this->addSql('CREATE TABLE classification__context (id VARCHAR(255) NOT NULL, name VARCHAR(255) NOT NULL, enabled TINYINT(1) NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB ROW_FORMAT = DYNAMIC;');
$this->addSql('CREATE TABLE classification__category (id INT AUTO_INCREMENT NOT NULL, parent_id INT DEFAULT NULL, context VARCHAR(255) DEFAULT NULL, media_id INT DEFAULT NULL, name VARCHAR(255) NOT NULL, enabled TINYINT(1) NOT NULL, slug VARCHAR(255) NOT NULL, description VARCHAR(255) DEFAULT NULL, position INT DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, INDEX IDX_43629B36727ACA70 (parent_id), INDEX IDX_43629B36E25D857E (context), INDEX IDX_43629B36EA9FDD75 (media_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB ROW_FORMAT = DYNAMIC;');

@ -14,7 +14,7 @@ class Version20181025064351 extends AbstractMigrationChamilo
/**
* @param Schema $schema
*/
public function up(Schema $schema) : void
public function up(Schema $schema): void
{
$this->addSql('CREATE TABLE session_audit (id INT NOT NULL, rev INT NOT NULL, id_coach INT DEFAULT NULL, session_category_id INT DEFAULT NULL, name VARCHAR(150) DEFAULT NULL, description LONGTEXT DEFAULT NULL, show_description TINYINT(1) DEFAULT NULL, duration INT DEFAULT NULL, nbr_courses SMALLINT DEFAULT NULL, nbr_users INT DEFAULT NULL, nbr_classes INT DEFAULT NULL, session_admin_id INT DEFAULT NULL, visibility INT DEFAULT NULL, promotion_id INT DEFAULT NULL, display_start_date DATETIME DEFAULT NULL, display_end_date DATETIME DEFAULT NULL, access_start_date DATETIME DEFAULT NULL, access_end_date DATETIME DEFAULT NULL, coach_access_start_date DATETIME DEFAULT NULL, coach_access_end_date DATETIME DEFAULT NULL, position INT DEFAULT 0, send_subscription_notification TINYINT(1) DEFAULT "0", revtype VARCHAR(4) NOT NULL, INDEX rev_627da30b8f560d22bdca080472e41ebe_idx (rev), PRIMARY KEY(id, rev)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB ROW_FORMAT = DYNAMIC;');
$this->addSql('CREATE TABLE resource_link_audit (id INT NOT NULL, rev INT NOT NULL, resource_node_id INT DEFAULT NULL, session_id INT DEFAULT NULL, user_id INT DEFAULT NULL, c_id INT DEFAULT NULL, group_id INT DEFAULT NULL, usergroup_id INT DEFAULT NULL, visibility INT DEFAULT NULL, start_visibility_at DATETIME DEFAULT NULL, end_visibility_at DATETIME DEFAULT NULL, revtype VARCHAR(4) NOT NULL, INDEX rev_b8ad249e8a6ede1472e0b8fa1db234bb_idx (rev), PRIMARY KEY(id, rev)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB ROW_FORMAT = DYNAMIC;');
@ -31,7 +31,7 @@ class Version20181025064351 extends AbstractMigrationChamilo
/**
* @param Schema $schema
*/
public function down(Schema $schema) : void
public function down(Schema $schema): void
{
}
}

@ -9,7 +9,6 @@ use Sonata\AdminBundle\Datagrid\DatagridMapper;
use Sonata\AdminBundle\Datagrid\ListMapper;
use Sonata\AdminBundle\Form\FormMapper;
use Sonata\AdminBundle\Show\ShowMapper;
use Sonata\CoreBundle\Form\Type\TranslatableChoiceType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
/**

@ -347,7 +347,7 @@ class CDocument extends AbstractResource implements ResourceInterface
}
/**
* This is a "soft delete" only changes visibility, doesn't delete the record
* This is a "soft delete" only changes visibility, doesn't delete the record.
*/
public function setSoftDelete()
{

Loading…
Cancel
Save