protected void checkIfEvaluationDateIsInExamsPeriod(DegreeCurricularPlan degreeCurricularPlan,
ExecutionSemester executionSemester, Date evaluationDate, MarkSheetType markSheetType, HttpServletRequest request,
ActionMessages actionMessages) {
ExecutionDegree executionDegree = degreeCurricularPlan.getExecutionDegreeByYear(executionSemester.getExecutionYear());
if (executionDegree == null) {
if (!markSheetType.equals(MarkSheetType.IMPROVEMENT)
|| !degreeCurricularPlan.canSubmitImprovementMarkSheets(executionSemester.getExecutionYear())) {
addMessage(request, actionMessages, "error.evaluationDateNotInExamsPeriod");
}
} else if (!executionDegree.isEvaluationDateInExamPeriod(evaluationDate, executionSemester, markSheetType)) {
OccupationPeriod occupationPeriod = executionDegree.getOccupationPeriodFor(executionSemester, markSheetType);
if (occupationPeriod == null) {
addMessage(request, actionMessages, "error.evaluationDateNotInExamsPeriod");
} else {
addMessage(request, actionMessages, "error.evaluationDateNotInExamsPeriodWithDates", occupationPeriod
.getStartYearMonthDay().toString("dd/MM/yyyy"),