/**
  * @param $status
  * @param User $user
  * @param Course $course
  * @param Session $session
  */
 private function addUserInCourse($status, User $user, Course $course, Session $session)
 {
     if ($session->isActive() && $user->getIsActive() && $course->isActive()) {
         if ($session->hasCourse($course)) {
             switch ($status) {
                 case Session::DRH:
                     if ($user->hasRole('ROLE_RRHH')) {
                         $session->addUserInSession(Session::DRH, $user);
                     }
                     break;
                 case Session::STUDENT:
                     $session->addUserInSession(Session::STUDENT, $user);
                     $session->addUserInCourse(Session::STUDENT, $user, $course);
                     break;
                 case Session::COACH:
                     if ($user->hasRole('ROLE_TEACHER')) {
                         $session->addUserInCourse(Session::COACH, $user, $course);
                     }
                     break;
             }
         }
     }
 }