} else { enrollmentsNumber--;
    public void calculateApprovationRatioAndArithmeticMeanIfActive(IExecutionYear currentExecutionYear) {        int enrollmentsNumber = 0;        int approvedEnrollmentsNumber = 0;        int totalGrade = 0;        for (IStudentCurricularPlan studentCurricularPlan : getStudentCurricularPlans()) {            for (IEnrolment enrolment : studentCurricularPlan.getEnrolments()) {                if (enrolment.getCondition() != EnrollmentCondition.INVISIBLE                        && enrolment.getExecutionPeriod().getExecutionYear() != currentExecutionYear) {                    enrollmentsNumber++;                    if (enrolment.getEnrollmentState() == EnrollmentState.APROVED) {                        Integer finalGrade = enrolment.getFinalGrade();                        if (finalGrade != null) {                            approvedEnrollmentsNumber++;                            totalGrade += finalGrade;                        }                    }                }            }        }        setApprovationRatio((enrollmentsNumber == 0) ? 0 : (double) approvedEnrollmentsNumber                / enrollmentsNumber);        setArithmeticMean((approvedEnrollmentsNumber == 0) ? 0 : (double) totalGrade                / approvedEnrollmentsNumber);    }