Fix entity repository

pull/3924/head
Julio Montoya 3 years ago
parent 593b2285ac
commit 74130e5df4
  1. 2
      public/main/exercise/hotspot_answers.as.php
  2. 3
      public/main/gamification/my_progress.php
  3. 3
      public/main/inc/lib/banner.lib.php

@ -227,7 +227,7 @@ if (!$hideExpectedAnswer) {
$data['answers'] = []; $data['answers'] = [];
$rs = $em $rs = $em
->getRepository('ChamiloCoreBundle:TrackEHotspot') ->getRepository(TrackEHotspot::class)
->findBy( ->findBy(
[ [
'hotspotQuestionId' => $questionId, 'hotspotQuestionId' => $questionId,

@ -1,6 +1,7 @@
<?php <?php
/* For licensing terms, see /license.txt */ /* For licensing terms, see /license.txt */
use Chamilo\CoreBundle\Entity\TrackECourseAccess;
use Chamilo\CoreBundle\Repository\TrackECourseAccessRepository; use Chamilo\CoreBundle\Repository\TrackECourseAccessRepository;
/** /**
@ -29,7 +30,7 @@ $user = api_get_user_entity($userId);
if (empty($sessionId) && $user) { if (empty($sessionId) && $user) {
/** @var TrackECourseAccessRepository $trackCourseAccessRepository */ /** @var TrackECourseAccessRepository $trackCourseAccessRepository */
$trackCourseAccessRepository = $entityManager->getRepository('ChamiloCoreBundle:TrackECourseAccess'); $trackCourseAccessRepository = $entityManager->getRepository(TrackECourseAccess::class);
$lastCourseAccess = $trackCourseAccessRepository->getLastAccessByUser($user); $lastCourseAccess = $trackCourseAccessRepository->getLastAccessByUser($user);
$lastSessionId = 0; $lastSessionId = 0;
if ($lastCourseAccess) { if ($lastCourseAccess) {

@ -348,8 +348,7 @@ function return_breadcrumb($interbreadcrumb, $language_file, $nameTools)
if (!empty($courseInfo) && !isset($_GET['hide_course_breadcrumb'])) { if (!empty($courseInfo) && !isset($_GET['hide_course_breadcrumb'])) {
$sessionName = ''; $sessionName = '';
if (!empty($sessionId)) { if (!empty($sessionId)) {
/** @var \Chamilo\CoreBundle\Entity\Session $session */ $session = api_get_session_entity($sessionId);
$session = Database::getManager()->find('ChamiloCoreBundle:Session', $sessionId);
$sessionName = $session ? ' ('.cut($session->getName(), MAX_LENGTH_BREADCRUMB).')' : ''; $sessionName = $session ? ' ('.cut($session->getName(), MAX_LENGTH_BREADCRUMB).')' : '';
} }

Loading…
Cancel
Save