if (registration != null && !registration.isTransition()) {
for (final CycleType cycleType : registration.getDegreeType().getCycleTypes()) {
final CycleCurriculumGroup cycleCGroup = studentCurricularPlan.getRoot().getCycleCurriculumGroup(cycleType);
if (cycleCGroup != null && !cycleCGroup.isExternal()) {
final RegistrationConclusionBean registrationConclusionBean =
new RegistrationConclusionBean(registration, cycleCGroup);
ExecutionYear conclusionYear = null;
if (cycleCGroup.isConcluded()) {
conclusionYear = registrationConclusionBean.getConclusionYear();
if (conclusionYear != executionYear && conclusionYear != executionYear.getPreviousExecutionYear()) {
continue;
}
}
if ((registration.isActive() || registration.isConcluded()) && conclusionYear != null) {
reportRaides(spreadsheet, registration, getFullRegistrationPath(registration), executionYear,
cycleType, true, registrationConclusionBean.getConclusionDate());
} else if (registration.isActive()) {
reportRaides(spreadsheet, registration, getFullRegistrationPath(registration), executionYear,
cycleType, false, null);
}
}