public function __construct(CursusUser $cursusUser)
 {
     $cursus = $cursusUser->getCursus();
     $user = $cursusUser->getUser();
     $details = [];
     $details['username'] = $user->getUsername();
     $details['firsName'] = $user->getFirstName();
     $details['lastName'] = $user->getLastName();
     $details['cursusId'] = $cursus->getId();
     $details['cursusTitle'] = $cursus->getTitle();
     $details['cursusCode'] = $cursus->getCode();
     $details['registrationDate'] = $cursusUser->getRegistrationDate()->format('d/m/Y H:i:s');
     parent::__construct(self::ACTION, $details, $user);
 }
 /**
  * @EXT\Route(
  *     "cursus/user/{cursusUser}/delete",
  *     name="claro_cursus_user_delete",
  *     options={"expose"=true}
  * )
  * @EXT\ParamConverter("authenticatedUser", options={"authenticatedUser" = true})
  */
 public function cursusUserDeleteAction(CursusUser $cursusUser)
 {
     $this->checkToolAccess();
     $this->cursusManager->unregisterUserFromCursus($cursusUser->getCursus(), $cursusUser->getUser());
     return new JsonResponse('success', 200);
 }