protected void teamFormingSessionAdd() throws IOException {
String json = req.getParameter("teamformingsession");
Gson gson = new Gson();
TeamFormingSession e = gson.fromJson(json, TeamFormingSession.class);
try{
TeamForming teamForming = TeamForming.inst();
teamForming.createTeamFormingSession(e.getCourseID(), e.getStart(),
e.getDeadline(), e.getTimeZone(), e.getGracePeriod(), e.getInstructions(), e.getProfileTemplate());
resp.getWriter().write("ok");
}
catch (TeamFormingSessionExistsException ex){
resp.getWriter().write("fail");
}