コード例 #1
0
  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;
  }
コード例 #2
0
  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;
  }
コード例 #3
0
  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;
  }