}
private void calculateGrade(final CycleType cycleType, CurriculumModule module) {
if (module.isLeaf()) {
if (module.isEnrolment()) {
final Enrolment enrolment = (Enrolment) module;
final BigDecimal weigth = enrolment.getWeigthForCurriculum();
enrolledECTS = enrolledECTS.add(weigth);
if (enrolment.isApproved()) {
completedECTS = completedECTS.add(weigth);
if (cycleType == CycleType.FIRST_CYCLE) {
completedECTSCycle1 = completedECTSCycle1.add(weigth);
} else if (cycleType == CycleType.SECOND_CYCLE) {
completedECTSCycle2 = completedECTSCycle2.add(weigth);
}
final Grade grade = enrolment.getGrade();
if (grade.isNumeric()) {
final BigDecimal value = grade.getNumericValue();
factoredECTS = factoredECTS.add(weigth);
factoredGradeSum = factoredGradeSum.add(value.multiply(weigth));
if (cycleType == CycleType.FIRST_CYCLE) {