@SuppressWarnings("unchecked")
public ActionForward showActiveCurricularCourseScope(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws FenixActionException, FenixServiceException {
final ExecutionDegreeListBean executionDegreeBean = getRenderedObject("academicInterval");
try {
final SortedSet<DegreeModuleScope> degreeModuleScopes =
ReadActiveCurricularCourseScopeByDegreeCurricularPlanAndExecutionYear.run(executionDegreeBean
.getDegreeCurricularPlan().getExternalId(), executionDegreeBean.getAcademicInterval());
final ActionErrors errors = new ActionErrors();
if (degreeModuleScopes.isEmpty()) {
errors.add("noDegreeCurricularPlan", new ActionError("error.nonExisting.AssociatedCurricularCourses"));
saveErrors(request, errors);
} else {
request.setAttribute("degreeModuleScopes", degreeModuleScopes);
}
} catch (NotAuthorizedException ex1) {
addActionMessage(request, "message.not-authorized");
return mapping.findForward("chooseExecutionYear");
}
request.setAttribute(PresentationConstants.ACADEMIC_INTERVAL, executionDegreeBean.getAcademicInterval());
request.setAttribute("degreeCurricularPlan", executionDegreeBean.getDegreeCurricularPlan());
return mapping.findForward("showActiveCurricularCourses");
}