private boolean isEnrolingDissertation( final EnrolmentContext enrolmentContext, final ExternalCurriculumGroup externalCurriculumGroup) { for (final IDegreeModuleToEvaluate degreeModuleToEvaluate : enrolmentContext.getDegreeModulesToEvaluate()) { if (degreeModuleToEvaluate.isDissertation() && externalCurriculumGroup.hasCurriculumModule( degreeModuleToEvaluate.getCurriculumGroup()) && isEnrolingInSemester(enrolmentContext, degreeModuleToEvaluate)) { return true; } } return false; }
private Double calculateApprovedAndEnrollingTotalCredits( final EnrolmentContext enrolmentContext, final ExternalCurriculumGroup externalCurriculumGroup) { double result = 0; final ExecutionSemester executionSemester = enrolmentContext.getExecutionPeriod(); for (final IDegreeModuleToEvaluate degreeModuleToEvaluate : enrolmentContext.getDegreeModulesToEvaluate()) { if (degreeModuleToEvaluate.isLeaf() && externalCurriculumGroup.hasCurriculumModule( degreeModuleToEvaluate.getCurriculumGroup())) { result += degreeModuleToEvaluate.getEctsCredits(executionSemester); } } result += externalCurriculumGroup.getAprovedEctsCredits(); return result; }
private boolean isToApply( IDegreeModuleToEvaluate sourceDegreeModuleToEvaluate, final EnrolmentContext enrolmentContext, final ExternalCurriculumGroup externalCurriculumGroup) { if (!sourceDegreeModuleToEvaluate.isLeaf()) { return false; } for (final IDegreeModuleToEvaluate degreeModuleToEvaluate : enrolmentContext.getDegreeModulesToEvaluate()) { if (externalCurriculumGroup.hasCurriculumModule(degreeModuleToEvaluate.getCurriculumGroup()) && (isEnrolingInSemester(enrolmentContext, degreeModuleToEvaluate))) { return true; } } return false; }