}
public ActionForward enrolInCycleCourseGroup(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws FenixServiceException {
final CycleEnrolmentBean cycleEnrolmentBean = getCycleEnrolmentBeanFromViewState();
try {
EnrolInAffinityCycle.run(getLoggedPerson(request), cycleEnrolmentBean);
} catch (final IllegalDataAccessException e) {
addActionMessage(request, "error.NotAuthorized");
request.setAttribute("withRules", request.getParameter("withRules"));
request.setAttribute("cycleEnrolmentBean", cycleEnrolmentBean);
return mapping.findForward("chooseCycleCourseGroupToEnrol");
} catch (final DomainException e) {
addActionMessage(request, e.getKey(), e.getArgs());
request.setAttribute("withRules", request.getParameter("withRules"));
request.setAttribute("cycleEnrolmentBean", cycleEnrolmentBean);
return mapping.findForward("chooseCycleCourseGroupToEnrol");
}
return prepareShowDegreeModulesToEnrol(mapping, form, request, response, cycleEnrolmentBean.getStudentCurricularPlan(),
cycleEnrolmentBean.getExecutionPeriod());
}