for (final Context context : courseGroup.getContextsWithCourseGroups()) { collectChildCourseGroups(result, (CourseGroup) context.getDegreeModule(), currentCourseGroupName);
for (final Context context : courseGroup.getSortedContextsWithCourseGroups()) { collectChildCourseGroups(result, (CourseGroup) context.getDegreeModule(), currentCourseGroupName + ((courseGroup.isRoot()) ? "" : " > "), allParents);
    private void collectChildCourseGroups(final List<SelectItem> result, final CourseGroup courseGroup,            final String previousCourseGroupName) throws FenixFilterException, FenixServiceException {        String currentCourseGroupName = "";        if (!courseGroup.isRoot() && getCourseGroup(getParentCourseGroupID()) != courseGroup) {            currentCourseGroupName = ((previousCourseGroupName.length() == 0) ? "" : (previousCourseGroupName + " > "))                    + courseGroup.getName();            result.add(new SelectItem(courseGroup.getIdInternal(), currentCourseGroupName));        }        for (final Context context : courseGroup.getContextsWithCourseGroups()) {            collectChildCourseGroups(result, (CourseGroup) context.getDegreeModule(),                    currentCourseGroupName);        }    }