HttpServletResponse response) {
final Student student = getLoggedStudent(request);
final List<StudentCurricularPlan> scps = generateSCPList(student);
if (enrollmentPeriodNotOpen(new ArrayList<StudentCurricularPlan>(scps))) {
EnrolmentPeriodInSpecialSeasonEvaluations enrolmentPeriod = getNextEnrollmentPeriod(scps);
if (enrolmentPeriod == null) {
addActionMessage("warning", request, "message.out.curricular.course.enrolment.period.default");
request.setAttribute("disableContinue", true);
} else {
addActionMessage("warning", request, "message.out.special.season.enrolment.period.upcoming", enrolmentPeriod
.getStartDateDateTime().toString("dd-MM-yyyy"),
enrolmentPeriod.getEndDateDateTime().toString("dd-MM-yyyy"));
request.setAttribute("disableContinue", true);
}
} else if (hasPendingDebts(student)) {
addActionMessage("error", request, "error.special.season.cannot.enroll.due.to.pending.debts");
request.setAttribute("disableContinue", true);