Course tool: Add CourseHomePage.php tool

pull/4006/head
Julio 5 years ago
parent bb56e66d25
commit 72f3e6d76b
  1. 36
      src/CoreBundle/Tool/CourseHomePage.php
  2. 1
      src/CoreBundle/Tool/ToolChain.php
  3. 2
      tests/CoreBundle/Repository/Node/CourseRepositoryTest.php

@ -0,0 +1,36 @@
<?php
declare(strict_types=1);
/* For licensing terms, see /license.txt */
namespace Chamilo\CoreBundle\Tool;
class CourseHomePage extends AbstractTool implements ToolInterface
{
public function getName(): string
{
return 'course_homepage';
}
public function getLink(): string
{
return '/resources/course_homepage';
}
public function getIcon(): string
{
return 'mdi-file-link';
}
public function getCategory(): string
{
return 'admin';
}
public function getResourceTypes(): ?array
{
return [
];
}
}

@ -157,6 +157,7 @@ class ToolChain
'notebook',
//'blog',
'course_tool',
'course_homepage',
'tracking',
'course_setting',
'course_maintenance',

@ -93,7 +93,7 @@ class CourseRepositoryTest extends WebTestCase
$this->assertSame(1, $count);
// Check tools.
$this->assertSame(22, \count($course->getTools()));
$this->assertCount(23, $course->getTools());
// Check resource links for each Tool
foreach ($course->getTools() as $tool) {

Loading…
Cancel
Save