diff --git a/assets/vue/views/ccalendarevent/List.vue b/assets/vue/views/ccalendarevent/List.vue index 7a84610274..60cb5bd621 100644 --- a/assets/vue/views/ccalendarevent/List.vue +++ b/assets/vue/views/ccalendarevent/List.vue @@ -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'; } diff --git a/src/CoreBundle/Migrations/Schema/V200/Version20191101132000.php b/src/CoreBundle/Migrations/Schema/V200/Version20191101132000.php index fcccb8aa15..a748c16804 100644 --- a/src/CoreBundle/Migrations/Schema/V200/Version20191101132000.php +++ b/src/CoreBundle/Migrations/Schema/V200/Version20191101132000.php @@ -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'); diff --git a/src/CourseBundle/Entity/CToolIntro.php b/src/CourseBundle/Entity/CToolIntro.php index a231da24c4..b018e7d2e3 100644 --- a/src/CourseBundle/Entity/CToolIntro.php +++ b/src/CourseBundle/Entity/CToolIntro.php @@ -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 diff --git a/tests/CourseBundle/Repository/CToolIntroRepositoryTest.php b/tests/CourseBundle/Repository/CToolIntroRepositoryTest.php index ac90695736..3cc57fd3df 100644 --- a/tests/CourseBundle/Repository/CToolIntroRepositoryTest.php +++ b/tests/CourseBundle/Repository/CToolIntroRepositoryTest.php @@ -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([])); diff --git a/tests/behat/features/toolForum.feature b/tests/behat/features/toolForum.feature index 941142a750..668e464ad4 100644 --- a/tests/behat/features/toolForum.feature +++ b/tests/behat/features/toolForum.feature @@ -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