|
|
|
|
@ -48,9 +48,10 @@ class CourseController extends ToolBaseController |
|
|
|
|
{ |
|
|
|
|
#[Route('/{cid}/home.json', name: 'chamilo_core_course_home_json')] |
|
|
|
|
#[Entity('course', expr: 'repository.find(cid)')] |
|
|
|
|
public function indexJsonAction(Request $request, CToolRepository $toolRepository, CShortcutRepository $shortcutRepository, ToolChain $toolChain): Response |
|
|
|
|
public function indexJson(Request $request, CToolRepository $toolRepository, CShortcutRepository $shortcutRepository, ToolChain $toolChain): Response |
|
|
|
|
{ |
|
|
|
|
$course = $this->getCourse(); |
|
|
|
|
$sessionId = $this->getSessionId(); |
|
|
|
|
|
|
|
|
|
if (null === $course) { |
|
|
|
|
throw $this->createAccessDeniedException(); |
|
|
|
|
@ -68,7 +69,6 @@ class CourseController extends ToolBaseController |
|
|
|
|
|
|
|
|
|
$courseCode = $course->getCode(); |
|
|
|
|
$courseId = $course->getId(); |
|
|
|
|
$sessionId = $this->getSessionId(); |
|
|
|
|
|
|
|
|
|
if ($user && $user->hasRole('ROLE_INVITEE')) { |
|
|
|
|
$isInASession = $sessionId > 0; |
|
|
|
|
|