curricularCourseJsonObject.addProperty("total", entry.getTotal());
JsonArray gradesArray = new JsonArray();
for (Enrolment enrolment : entry.enrolmentList) {
Grade grade = enrolment.getGrade();
JsonObject enrolmentJson = new JsonObject();
if (grade != null && grade.isApproved()) {
enrolmentJson.addProperty("grade", grade.getIntegerValue());
} else if (grade.isNotEvaluated()) {
enrolmentJson.addProperty("grade", "NA");
} else if (grade.isNotApproved()) {
enrolmentJson.addProperty("grade", "RE");
}
gradesArray.add(enrolmentJson);
}
curricularCourseJsonObject.add("grades", gradesArray);