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'] = [];
$rs = $em
->getRepository('ChamiloCoreBundle:TrackEHotspot')
->getRepository(TrackEHotspot::class)
->findBy(
[
'hotspotQuestionId' => $questionId,

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

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

Loading…
Cancel
Save