Source:
<code>public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { final List<StudentPortalBean> studentPortalBeans = new ArrayList<StudentPortalBean>(); final List<String> genericDegreeWarnings = new ArrayList<String>(); final Student student = AccessControl.getPerson().getStudent(); if (student != null) { for (final Registration registration : student.getAllRegistrations()) { <START> if (considerRegistration(registration.getLastStateType())) { <END> final DegreeCurricularPlan degreeCurricularPlan = registration.getLastDegreeCurricularPlan(); if (registration.getAttendingExecutionCoursesForCurrentExecutionPeriod().isEmpty() == false) { studentPortalBeans.add(new StudentPortalBean(registration.getDegree(), student, registration.getAttendingExecutionCoursesForCurrentExecutionPeriod(), degreeCurricularPlan)); } if (hasSpecialSeasonEnrolments(student)) { genericDegreeWarnings.addAll(getEnrolmentPeriodCoursesAfterSpecialSeason(degreeCurricularPlan)); } else { genericDegreeWarnings.addAll(getEnrolmentPeriodCourses(degreeCurricularPlan)); } genericDegreeWarnings.addAll(getEnrolmentPeriodInSpecialSeasonEvaluations(degreeCurricularPlan)); genericDegreeWarnings.addAll(getEnrolmentPeriodClasses(degreeCurricularPlan)); } } } request.setAttribute("genericDegreeWarnings", genericDegreeWarnings); request.setAttribute("studentPortalBeans", studentPortalBeans); request.setAttribute("executionSemester", ExecutionSemester.readActualExecutionSemester().getQualifiedName()); return mapping.findForward("studentPortal"); }</code><technical_language>This filter is necessary, validate "acceptable" registrations for this is specific is subject get outdated more states added eventually. check is done in registration for attends</technical_language>

Target:
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { List<StudentPortalBean> studentPortalBeans = new ArrayList<StudentPortalBean>(); List<String> genericDegreeWarnings = new ArrayList<String>(); final Student student = AccessControl.getPerson().getStudent(); if (student != null) { for (Registration registration : student.getAllRegistrations()) { DegreeCurricularPlan degreeCurricularPlan = registration.getLastDegreeCurricularPlan(); if (registration.getAttendingExecutionCoursesForCurrentExecutionPeriod().isEmpty() == false) { studentPortalBeans.add(new StudentPortalBean(registration.getDegree(), student, registration .getAttendingExecutionCoursesForCurrentExecutionPeriod(), degreeCurricularPlan)); } if (hasSpecialSeasonEnrolments(student)) { genericDegreeWarnings.addAll(getEnrolmentPeriodCoursesAfterSpecialSeason(degreeCurricularPlan)); } else { genericDegreeWarnings.addAll(getEnrolmentPeriodCourses(degreeCurricularPlan)); } genericDegreeWarnings.addAll(getEnrolmentPeriodInSpecialSeasonEvaluations(degreeCurricularPlan)); genericDegreeWarnings.addAll(getEnrolmentPeriodClasses(degreeCurricularPlan)); } } request.setAttribute("genericDegreeWarnings", genericDegreeWarnings); request.setAttribute("studentPortalBeans", studentPortalBeans); request.setAttribute("executionSemester", ExecutionSemester.readActualExecutionSemester().getQualifiedName()); return mapping.findForward("studentPortal"); }