diff --git a/src/CoreBundle/Controller/CourseController.php b/src/CoreBundle/Controller/CourseController.php index e07a197971..9c8632c5ff 100644 --- a/src/CoreBundle/Controller/CourseController.php +++ b/src/CoreBundle/Controller/CourseController.php @@ -245,52 +245,6 @@ class CourseController extends ToolBaseController ]; } - // Get session-career diagram - $diagram = ''; - /*$allow = api_get_configuration_value('allow_career_diagram'); - if (true === $allow) { - $htmlHeadXtra[] = api_get_js('jsplumb2.js'); - $extra = new ExtraFieldValue('session'); - $value = $extra->get_values_by_handler_and_field_variable( - api_get_session_id(), - 'external_career_id' - ); - - if (!empty($value) && isset($value['value'])) { - $careerId = $value['value']; - $extraFieldValue = new ExtraFieldValue('career'); - $item = $extraFieldValue->get_item_id_from_field_variable_and_field_value( - 'external_career_id', - $careerId, - false, - false, - false - ); - - if (!empty($item) && isset($item['item_id'])) { - $careerId = $item['item_id']; - $career = new Career(); - $careerInfo = $career->get($careerId); - if (!empty($careerInfo)) { - $extraFieldValue = new ExtraFieldValue('career'); - $item = $extraFieldValue->get_values_by_handler_and_field_variable( - $careerId, - 'career_diagram', - false, - false, - 0 - ); - - if (!empty($item) && isset($item['value']) && !empty($item['value'])) { - // @var Graph $graph - $graph = UnserializeApi::unserialize('career', $item['value']); - $diagram = Career::renderDiagram($careerInfo, $graph); - } - } - } - } - }*/ - // Deleting the objects $session->remove('toolgroup'); $session->remove('_gid'); @@ -306,10 +260,14 @@ class CourseController extends ToolBaseController $shortcuts = $shortcutQuery->getQuery()->getResult(); } $responseData = [ - 'course' => $course, + 'course' => [ + 'id' => $course->getId(), + 'title' => $course->getTitle(), + 'resourceNode' => $course->getResourceNode(), + ], 'session' => $courseSession, 'shortcuts' => $shortcuts, - 'diagram' => $diagram, + 'diagram' => '', 'tools' => $tools, ]; diff --git a/src/CoreBundle/EventSubscriber/AnonymousUserSubscriber.php b/src/CoreBundle/EventSubscriber/AnonymousUserSubscriber.php index 4418b44ee4..2d4fda148d 100644 --- a/src/CoreBundle/EventSubscriber/AnonymousUserSubscriber.php +++ b/src/CoreBundle/EventSubscriber/AnonymousUserSubscriber.php @@ -113,7 +113,6 @@ class AnonymousUserSubscriber implements EventSubscriberInterface foreach ($anonymousUsers as $user) { $loginRecord = $trackLoginRepository->findOneBy(['userIp' => $userIp, 'user' => $user]); if ($loginRecord) { - error_log('Existing login found for user ID: '.$user->getId()); return $user->getId(); } @@ -147,8 +146,6 @@ class AnonymousUserSubscriber implements EventSubscriberInterface $this->entityManager->persist($anonymousUser); $this->entityManager->flush(); - error_log('New anonymous user created: '.$anonymousUser->getId()); - return $anonymousUser->getId(); } }