diff --git a/.php_cs.dist b/.php_cs.dist index 88c458e3a3..840f670175 100644 --- a/.php_cs.dist +++ b/.php_cs.dist @@ -82,6 +82,7 @@ $finder = PhpCsFixer\Finder::create() ->exclude('web') ->notPath('main/admin/db.php') + ->notPath('public/check.php') ->notPath('main/admin/ldap_synchro.php') ->notPath('main/chat/emoji_strategy.php') ->in(__DIR__) diff --git a/config/packages/liip_theme.yaml b/config/packages/liip_theme.yaml index c29e46e2e3..cda949061d 100644 --- a/config/packages/liip_theme.yaml +++ b/config/packages/liip_theme.yaml @@ -3,4 +3,4 @@ liip_theme: active_theme: 'default' path_patterns: bundle_resource: - - '%kernel.root_dir%/../templates/themes/%%current_theme%%/%%bundle_name%%/%%template%%' \ No newline at end of file + - '%kernel.root_dir%/../templates/themes/%%current_theme%%/%%bundle_name%%/%%template%%' diff --git a/config/packages/sonata_block.yaml b/config/packages/sonata_block.yaml index 51a3367f06..4fcbb4c37f 100644 --- a/config/packages/sonata_block.yaml +++ b/config/packages/sonata_block.yaml @@ -9,9 +9,9 @@ sonata_block: blocks: # Chamilo blocks -# chamilo_core.block.breadcrumb: ~ -# chamilo_core.block.course: ~ -# chamilo_core.block.skill: ~ + chamilo_core.block.breadcrumb: ~ + chamilo_core.block.course: ~ + chamilo_core.block.skill: ~ sonata.admin.block.stats: contexts: [admin] sonata.admin.block.admin_list: diff --git a/config/packages/sonata_timeline.yaml b/config/packages/sonata_timeline.yaml index b71118fdc0..fca5701b84 100644 --- a/config/packages/sonata_timeline.yaml +++ b/config/packages/sonata_timeline.yaml @@ -1,7 +1,7 @@ sonata_timeline: manager_type: orm class: - timeline: '%spy_timeline.class.timeline%' - action: '%spy_timeline.class.action%' - component: '%spy_timeline.class.component%' + timeline: '%spy_timeline.class.timeline%' + action: '%spy_timeline.class.action%' + component: '%spy_timeline.class.component%' action_component: '%spy_timeline.class.action_component%' diff --git a/main/exercise/fill_blanks.class.php b/main/exercise/fill_blanks.class.php index c8896cec0e..a6d43ef76e 100755 --- a/main/exercise/fill_blanks.class.php +++ b/main/exercise/fill_blanks.class.php @@ -845,7 +845,7 @@ class FillBlanks extends Question * -2 : didn't answer * -1 : student answer is wrong * 0 : student answer is correct - * >0 : for fill the blank question with choice menu, is the index of the student answer (right answer index is 0) + * >0 : choice menu, is the index of the student answer (right answer index is 0) * * @param int $testId * @param int $questionId diff --git a/main/inc/lib/api.lib.php b/main/inc/lib/api.lib.php index 8d02d299f5..9bd151f3e8 100644 --- a/main/inc/lib/api.lib.php +++ b/main/inc/lib/api.lib.php @@ -3683,6 +3683,7 @@ function api_is_anonymous($user_id = null, $db_check = false) return true; } } + return !Container::getAuthorizationChecker()->isGranted('IS_AUTHENTICATED_FULLY'); } @@ -3711,7 +3712,7 @@ function api_not_allowed( // src/ThemeBundle/Resources/views/Exception/error404.html.twig $exception = new Exception($message); $request = Container::getRequest(); - $exception = \Symfony\Component\Debug\Exception\FlattenException::create($exception, $responseCode); + $exception = \Symfony\Component\Debug\Exception\FlattenException::create($exception, $responseCode); $controller = new \Chamilo\ThemeBundle\Controller\ExceptionController(Container::getTwig(), $debug); $response = $controller->showAction($request, $exception); $response->send(); diff --git a/main/inc/lib/display.lib.php b/main/inc/lib/display.lib.php index 56264e337a..d8b8365027 100755 --- a/main/inc/lib/display.lib.php +++ b/main/inc/lib/display.lib.php @@ -2,10 +2,8 @@ /* For licensing terms, see /license.txt */ use Chamilo\CoreBundle\Entity\ExtraField; -use ChamiloSession as Session; -use Chamilo\CoreBundle\Entity\SessionRelCourseRelUser; use Chamilo\CoreBundle\Framework\Container; -use Chamilo\UserBundle\Entity\User; +use ChamiloSession as Session; use Symfony\Component\HttpFoundation\Response; /** diff --git a/src/CoreBundle/EventListener/LegacyListener.php b/src/CoreBundle/EventListener/LegacyListener.php index 08eae8d029..7a19be6c77 100644 --- a/src/CoreBundle/EventListener/LegacyListener.php +++ b/src/CoreBundle/EventListener/LegacyListener.php @@ -124,7 +124,7 @@ class LegacyListener $languageList[languageToCountryIsoCode($isoCode)] = $language; } - $twig->addGlobal('current_locale_iso',languageToCountryIsoCode($request->getLocale())); + $twig->addGlobal('current_locale_iso', languageToCountryIsoCode($request->getLocale())); $twig->addGlobal('available_locales', $languages); $twig->addGlobal('show_toolbar', \Template::isToolBarDisplayedForUser() ? 1 : 0); diff --git a/src/CoreBundle/EventListener/LegacyLoginListener.php b/src/CoreBundle/EventListener/LegacyLoginListener.php index 21c110683e..5f2329451f 100644 --- a/src/CoreBundle/EventListener/LegacyLoginListener.php +++ b/src/CoreBundle/EventListener/LegacyLoginListener.php @@ -16,7 +16,8 @@ use Symfony\Component\Security\Http\Event\InteractiveLoginEvent; /** * Class LegacyLoginListener. - * File not needed the real listener is LegacyListener + * File not needed the real listener is LegacyListener. + * * @deprecated * * @package Chamilo\CoreBundle\EventListener diff --git a/src/ThemeBundle/Controller/NavbarController.php b/src/ThemeBundle/Controller/NavbarController.php index cce8e66696..bc86662062 100644 --- a/src/ThemeBundle/Controller/NavbarController.php +++ b/src/ThemeBundle/Controller/NavbarController.php @@ -9,7 +9,6 @@ use Chamilo\ThemeBundle\Event\ShowUserEvent; use Chamilo\ThemeBundle\Event\TaskListEvent; use Chamilo\ThemeBundle\Event\ThemeEvents; use Symfony\Bundle\FrameworkBundle\Controller\Controller; -use Symfony\Component\EventDispatcher\EventDispatcher; use Symfony\Component\HttpFoundation\Response; /** @@ -21,6 +20,7 @@ class NavbarController extends Controller { /** * @deprecated + * * @param int $max * * @return Response @@ -44,6 +44,7 @@ class NavbarController extends Controller /** * @deprecated + * * @param int $max * * @return Response @@ -67,6 +68,7 @@ class NavbarController extends Controller /** * @deprecated + * * @param int $max * * @return Response diff --git a/src/UserBundle/Entity/User.php b/src/UserBundle/Entity/User.php index 82e58bd58c..91f88a2b9f 100644 --- a/src/UserBundle/Entity/User.php +++ b/src/UserBundle/Entity/User.php @@ -1867,5 +1867,4 @@ class User extends BaseUser implements ThemeUser, EquatableInterface //implement return true; } - }