Exemplo n.º 1
0
  public BigDecimal getNumberOfApprovedEctsOneYearAgo() {
    ExecutionYear oneYearAgo = getForExecutionYear().getPreviousExecutionYear();
    BigDecimal result = BigDecimal.ZERO;

    if (student == null) {
      return BigDecimal.ZERO;
    }

    for (final Registration registration : student.getRegistrationsSet()) {

      if (registration.isBolonha() && registration.hasAnyEnrolmentsIn(oneYearAgo)) {
        result =
            result
                .add(
                    calculateApprovedECTS(
                        registration
                            .getLastStudentCurricularPlan()
                            .getAprovedEnrolmentsInExecutionPeriod(
                                oneYearAgo.getFirstExecutionPeriod())))
                .add(
                    calculateApprovedECTS(
                        registration
                            .getLastStudentCurricularPlan()
                            .getAprovedEnrolmentsInExecutionPeriod(
                                oneYearAgo.getLastExecutionPeriod())));
      }
    }

    return result;
  }
Exemplo n.º 2
0
  public BigDecimal getNumberOfEnrolledEctsOneYearAgo() {
    ExecutionYear oneYearAgo = getForExecutionYear().getPreviousExecutionYear();
    BigDecimal result = BigDecimal.ZERO;

    if (student == null) {
      return BigDecimal.ZERO;
    }

    for (final Registration registration : student.getRegistrationsSet()) {
      if (registration.isBolonha() && registration.hasAnyEnrolmentsIn(oneYearAgo)) {
        result = result.add(new BigDecimal(getEnrolmentsEctsCredits(registration, oneYearAgo)));
      }
    }

    return result;
  }
  private final Collection<ICurriculumEntry> getEntriesToReport(final boolean useConcluded) {
    final HashSet<ICurriculumEntry> result = new HashSet<ICurriculumEntry>();

    final Registration registration = getRegistration();
    ICurriculum curriculum;
    if (registration.isBolonha()) {
      for (final CycleCurriculumGroup cycle :
          registration.getLastStudentCurricularPlan().getInternalCycleCurriculumGrops()) {
        if (cycle.hasAnyApprovedCurriculumLines()
            && (useConcluded || !cycle.isConclusionProcessed())) {
          curriculum = cycle.getCurriculum(getFilteringDate());
          filterEntries(result, this, curriculum);
        }
      }
    } else {
      curriculum = getRegistration().getCurriculum(getFilteringDate());
      filterEntries(result, this, curriculum);
    }

    return result;
  }