/*
* TODO: Important - change this code (must be generic to support
* several curricularPeriodInfoDTOs, instead of year and semester)
*/
CurricularPeriod curricularPeriod = null;
CurricularPeriodInfoDTO curricularPeriodInfoYear = null;
if (courseGroup.getParentDegreeCurricularPlan().getDegree().getDegreeType().getYears() > 1) {
curricularPeriodInfoYear = new CurricularPeriodInfoDTO(year, AcademicPeriod.YEAR);
}
final CurricularPeriodInfoDTO curricularPeriodInfoSemester =
new CurricularPeriodInfoDTO(semester, AcademicPeriod.SEMESTER);
if (curricularPeriodInfoYear != null) {
curricularPeriod = degreeCurricularPeriod.getCurricularPeriod(curricularPeriodInfoYear, curricularPeriodInfoSemester);
if (curricularPeriod == null) {
curricularPeriod =