Minor: Format code

pull/5235/head
Angel Fernando Quiroz Campos 9 months ago
parent 45bd9ae5ee
commit 645d6b8165
  1. 2
      src/CoreBundle/Controller/CourseController.php
  2. 2
      src/CoreBundle/Entity/ExtraField.php
  3. 6
      src/CoreBundle/Repository/Node/CourseRepository.php

@ -7,7 +7,6 @@ declare(strict_types=1);
namespace Chamilo\CoreBundle\Controller;
use Chamilo\CoreBundle\Entity\Course;
use Chamilo\CoreBundle\Entity\CourseCategory;
use Chamilo\CoreBundle\Entity\CourseRelUser;
use Chamilo\CoreBundle\Entity\ExtraField;
use Chamilo\CoreBundle\Entity\Session;
@ -711,7 +710,6 @@ class CourseController extends ToolBaseController
AccessUrlHelper $accessUrlHelper,
CourseRepository $courseRepository
): JsonResponse {
$searchTerm = $request->query->get('search', '');
$accessUrl = $accessUrlHelper->getCurrent();

@ -127,7 +127,7 @@ class ExtraField
protected DateTime $createdAt;
#[Groups(['extra_field:read'])]
#[ORM\Column(name: "auto_remove", type: "boolean", options: ["default" => false])]
#[ORM\Column(name: 'auto_remove', type: 'boolean', options: ['default' => false])]
protected bool $autoRemove = false;
public function __construct()

@ -104,14 +104,16 @@ class CourseRepository extends ResourceRepository
'user' => $user,
'url' => $url,
'status' => $status,
]);
])
;
if (!empty($keyword)) {
$qb->andWhere($qb->expr()->orX(
$qb->expr()->like('c.title', ':keyword'),
$qb->expr()->like('c.code', ':keyword')
))
->setParameter('keyword', '%'.$keyword.'%');
->setParameter('keyword', '%'.$keyword.'%')
;
}
$query = $qb->getQuery();

Loading…
Cancel
Save