private Object readParentCourseGroups(String selectedCurricularRuleType) {
final List<SelectItem> result = new ArrayList<SelectItem>();
if (selectedCurricularRuleType != null && !selectedCurricularRuleType.equals(NO_SELECTION_STRING)) {
for (final Context context : getDegreeModule().getParentContextsSet()) {
final CourseGroup courseGroup = context.getParentCourseGroup();
if (!courseGroup.isRoot()) {
result.add(new SelectItem(courseGroup.getExternalId(), courseGroup.getName()));
}
}
Collections.sort(result, new BeanComparator("label"));
}
result.add(0, new SelectItem(NO_SELECTION_STRING, BundleUtil.getString(Bundle.BOLONHA, "all")));