} else if (curriculumGroups.isEmpty() && !courseGroupsToEnrol.isEmpty()) {
generateCourseGroupToEnroll(blockContainer, courseGroupsToEnrol.iterator().next(), studentCurricularPlan, depth
+ getRenderer().getWidthDecreasePerLevel());
courseGroupsToEnrol.remove(0);
} else {
Context context = courseGroupsToEnrol.iterator().next().getContext();
CurriculumGroup curriculumGroup = curriculumGroups.iterator().next().getCurriculumModule();
if (curriculumGroup.getChildOrder(executionSemester) <= context.getChildOrder()) {
generateGroup(blockContainer, studentCurricularPlan, curriculumGroups.iterator().next(), executionSemester,
depth + getRenderer().getWidthDecreasePerLevel());
curriculumGroups.remove(0);
} else {
generateCourseGroupToEnroll(blockContainer, courseGroupsToEnrol.iterator().next(), studentCurricularPlan,