Merge branch 'master' of github.com:chamilo/chamilo-lms

pull/4013/head
Yannick Warnier 4 years ago
commit a195787788
  1. 5
      assets/vue/views/ccalendarevent/List.vue
  2. 4
      src/CoreBundle/Migrations/Schema/V200/Version20191101132000.php
  3. 2
      src/CourseBundle/Entity/CToolIntro.php
  4. 3
      tests/CourseBundle/Repository/CToolIntroRepositoryTest.php
  5. 3
      tests/behat/features/toolForum.feature

@ -163,6 +163,11 @@ export default {
}
// @todo fix locale connection between fullcalendar + chamilo
if ('en_US' === locale.value) {
locale.value = 'en';
}
if ('fr_FR' === locale.value) {
locale.value = 'fr';
}

@ -176,10 +176,12 @@ class Version20191101132000 extends AbstractMigrationChamilo
$this->addSql('DROP INDEX course ON c_tool_intro;');
}
$table = $schema->getTable('c_tool_intro');
$this->addSql("DELETE FROM c_tool_intro WHERE id = '0' ");
// Migrate only course intro.
$this->addSql("DELETE FROM c_tool_intro WHERE id <> 'course_homepage' ");
$this->addSql("DELETE FROM c_tool_intro WHERE id <> 'course_homepage' ");
$this->addSql('ALTER TABLE c_tool_intro CHANGE id id VARCHAR(255) DEFAULT NULL');

@ -125,7 +125,7 @@ class CToolIntro extends AbstractResource implements ResourceInterface, Resource
public function getResourceName(): string
{
return substr(strip_tags($this->getIntroText()), 0, 10);
return $this->getCourseTool()->getName();
}
public function setResourceName(string $name): self

@ -44,6 +44,9 @@ class CToolIntroRepositoryTest extends AbstractApiTest
$em->flush();
$this->assertNotEmpty($intro->getIntroText());
$this->assertNotNull($intro->getIid());
$this->assertNotEmpty($intro->getResourceName());
$this->assertSame(1, $repo->count([]));
$repo->delete($intro);
$this->assertSame(0, $repo->count([]));

@ -51,8 +51,9 @@ Feature: Forum tool
And I follow "Forum Test"
Then I follow "Thread One"
Then I follow "Delete"
And I confirm the popup
And wait for the page to be loaded
Then I should see "Thread deleted"
Then I should see "deleted"
# This test is commented because to quote a message is necessary load HTML code inside of textarea.
# And this breaks the page for Behat

Loading…
Cancel
Save