}
}
}
private void generateEnrolment(final HtmlTable groupTable, Enrolment enrolment) {
HtmlTableRow htmlTableRow = groupTable.createRow();
HtmlTableCell cellName = htmlTableRow.createCell();
cellName.setClasses(getEnrolmentNameClasses());
cellName.setBody(new HtmlText(enrolment.getName().getContent()));
// Year
final HtmlTableCell yearCell = htmlTableRow.createCell();
yearCell.setClasses(getEnrolmentYearClasses());
final StringBuilder year = new StringBuilder();
year.append(enrolment.getExecutionPeriod().getExecutionYear().getYear());
yearCell.setBody(new HtmlText(year.toString()));
// Semester
final HtmlTableCell semesterCell = htmlTableRow.createCell();
semesterCell.setClasses(getEnrolmentSemesterClasses());
final StringBuilder semester = new StringBuilder();
semester.append(enrolment.getExecutionPeriod().getSemester().toString());
semester.append(" ");
semester.append(BundleUtil.getString(Bundle.ENUMERATION, "SEMESTER.ABBREVIATION"));
semesterCell.setBody(new HtmlText(semester.toString()));
// Ects
final HtmlTableCell ectsCell = htmlTableRow.createCell();
ectsCell.setClasses(getEnrolmentEctsClasses());
final StringBuilder ects = new StringBuilder();
ects.append(enrolment.getCurricularCourse().getEctsCredits()).append(" ")
.append(BundleUtil.getString(Bundle.ACADEMIC, "credits.abbreviation"));
ectsCell.setBody(new HtmlText(ects.toString()));
MetaObject enrolmentMetaObject = MetaObjectFactory.createObject(enrolment, new Schema(Enrolment.class));
HtmlCheckBox checkBox = new HtmlCheckBox(true);
checkBox.setName("enrolmentCheckBox" + enrolment.getExternalId());
checkBox.setUserValue(enrolmentMetaObject.getKey().toString());
enrollmentsController.addCheckBox(checkBox);
HtmlTableCell cellCheckBox = htmlTableRow.createCell();
cellCheckBox.setClasses(getEnrolmentCheckBoxClasses());
cellCheckBox.setBody(checkBox);
}