private StringBuilder createGroupName(final String text, final CurriculumGroup curriculumGroup) {
final StringBuilder groupName = new StringBuilder(text);
if (curriculumGroup != null && curriculumGroup.getDegreeModule() != null) {
final CreditsLimit creditsLimit =
(CreditsLimit) curriculumGroup.getMostRecentActiveCurricularRule(CurricularRuleType.CREDITS_LIMIT,
executionYearContext);
if (creditsLimit != null) {
groupName.append(" <span title=\"");
groupName.append(BundleUtil.getString(Bundle.APPLICATION, "label.curriculum.credits.legend.minCredits"));
groupName.append(" \">m(");
groupName.append(creditsLimit.getMinimumCredits());
groupName.append(")</span>,");
}
groupName.append(" <span title=\"");
groupName.append(BundleUtil.getString(Bundle.APPLICATION, "label.curriculum.credits.legend.creditsConcluded"));
groupName.append(" \"> c(");
groupName.append(curriculumGroup.getCreditsConcluded(executionYearContext));
groupName.append(")</span>");
if (isViewerAllowedToViewFullStudentCurriculum(studentCurricularPlan)) {
groupName.append(" <span title=\"");
groupName.append(BundleUtil.getString(Bundle.APPLICATION, "label.curriculum.credits.legend.approvedCredits"));
groupName.append(" \">, ca(");
groupName.append(curriculumGroup.getAprovedEctsCredits());
groupName.append(")</span>");
}
if (creditsLimit != null) {
groupName.append("<span title=\"");
groupName.append(BundleUtil.getString(Bundle.APPLICATION, "label.curriculum.credits.legend.maxCredits"));
groupName.append("\">, M(");
groupName.append(creditsLimit.getMaximumCredits());
groupName.append(")</span>");
}
if (isViewerAllowedToViewFullStudentCurriculum(studentCurricularPlan) && studentCurricularPlan.isBolonhaDegree()
&& creditsLimit != null) {