}
private String findGroup(final CurricularCourse curricularCourse, final DegreeModuleScope degreeModuleScope) {
if (degreeModuleScope != null) {
if (degreeModuleScope instanceof DegreeModuleScopeCurricularCourseScope) {
final DegreeModuleScopeCurricularCourseScope degreeModuleScopeCurricularCourseScope =
(DegreeModuleScopeCurricularCourseScope) degreeModuleScope;
final Branch branch = degreeModuleScopeCurricularCourseScope.getCurricularCourseScope().getBranch();
return branch == null ? " " : branch.getName();
} else {
final DegreeModuleScopeContext degreeModuleScopeContext = (DegreeModuleScopeContext) degreeModuleScope;
final Context context = degreeModuleScopeContext.getContext();
return context.getParentCourseGroup().getName();