public ActionResult StudentEnterCourse(Guid id)
        {
            course = courses.GetCourse(id);
            HttpContext.Session.SetString("roomIdStudent", course.GeneralRoomId.ToString());
            HttpContext.Session.SetString("CourseIdStudent", course.Id.ToString());
            rooms = courses.GetAllRoomsByCourseId(id);
            for (int i = 0; i < rooms.Count; i++)
            {
                if (rooms[i].Id != course.GeneralRoomId)
                {
                    roomIds.Add(rooms[i].Id);
                }
            }
            SetQuestions(course.GeneralRoomId);

            return(Json(new
            {
                numberOfQuestion = questions.Count,
                numberOfRooms = rooms.Count - 1,
                roomsId = roomIds,
                owners = ownersName,
                questionsContent = questionContent,
                questionId = questionIds
            }));
        }
 private void SetRooms()
 {
     foreach (Room room in courses.GetAllRoomsByCourseId(course.Id))
     {
         if (room.Id != course.GeneralRoomId)
         {
             rooms.Add(room);
         }
     }
 }