if (enrolments.isEmpty()) {
return null;
}
JsonObject enrolmentsJsonObject = new JsonObject();
enrolmentsJsonObject.addProperty("name", BundleUtil.getString(Bundle.STUDENT, "label.student.statistics.marksheet"));
GradeScale gradeScale = enrolments.get(0).getGradeScale();
enrolmentsJsonObject.addProperty("grade-scale", gradeScale.name());
populateMinAndMaxGrade(gradeScale, enrolmentsJsonObject);
JsonArray gradesArray = new JsonArray();
for (Enrolment enrolment : enrolments) {
JsonObject enrolmentJsonObject = new JsonObject();
enrolmentJsonObject.addProperty("id", enrolment.getRegistration().getStudent().getNumber());