if (!courseGroup.isRoot() && getCourseGroup(getParentCourseGroupID()) != courseGroup) { currentCourseGroupName = ((previousCourseGroupName.length() == 0) ? "" : (previousCourseGroupName + " > ")) + courseGroup.getName(); result.add(new SelectItem(courseGroup.getIdInternal(), currentCourseGroupName));
if (!courseGroup.isRoot()) { currentCourseGroupName = previousCourseGroupName + courseGroup.getName(); if (getCourseGroup(getParentCourseGroupID()) != courseGroup && !allParents.contains(courseGroup)) { result.add(new SelectItem(courseGroup.getIdInternal(), currentCourseGroupName)); }
    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);        }    }