|
|
@ -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) { |
|
|
|