/**
  * @param SessionAccess $event
  */
 public function onSessionAccessEvent(SessionAccess $event)
 {
     $user = $event->getUser();
     $course = $event->getCourse();
     $session = $event->getSession();
     $ip = $this->request->getClientIp();
     $access = new TrackECourseAccess();
     $access->setCId($course->getId())->setUserId($user->getId())->setSessionId($session->getId())->setUserIp($ip);
     $this->em->persist($access);
     $this->em->flush();
 }
 /**
  * @param SessionAccess $event
  */
 public function onSessionAccessEvent(SessionAccess $event)
 {
     $user = $event->getUser();
     $course = $event->getCourse();
     $session = $event->getSession();
     $trackAccess = new TrackEAccess();
     $trackAccess->setCId($course->getId());
     $trackAccess->setAccessUserId($user->getId());
     $trackAccess->setAccessSessionId($session->getId());
     $this->em->persist($trackAccess);
     $this->em->flush();
 }