Beispiel #1
0
  private static BigDecimal calculateApprovedECTS(final Collection<Enrolment> list) {
    BigDecimal result = BigDecimal.ZERO;

    for (final CurriculumLine curriculumLine : list) {
      result = result.add(BigDecimal.valueOf(curriculumLine.getAprovedEctsCredits()));
    }

    return result;
  }
 private void reportApprovedCurriculumLines(
     final Collection<ICurriculumEntry> result, final Collection<CurriculumLine> lines) {
   for (final CurriculumLine line : lines) {
     if (line.isApproved()) {
       if (line.isEnrolment()) {
         result.add((IEnrolment) line);
       } else if (line.isDismissal() && ((Dismissal) line).getCredits().isSubstitution()) {
         result.addAll(((Dismissal) line).getSourceIEnrolments());
       }
     }
   }
 }
  private Collection<CurriculumLine> calculateExtraCurriculumLines() {
    final Collection<CurriculumLine> result = new HashSet<CurriculumLine>();

    for (final CurriculumLine line : getRegistration().getExtraCurricularCurriculumLines()) {
      if (line.isEnrolment()) {
        if (!((Enrolment) line).isSourceOfAnyCreditsInCurriculum()) {
          result.add(line);
        }
      } else {
        result.add(line);
      }
    }

    return result;
  }
  private boolean isEnroledIn(
      IDegreeModuleToEvaluate degreeModuleToEvaluate, ExecutionSemester executionSemester) {
    if (degreeModuleToEvaluate.isLeaf()) {
      final EnroledCurriculumModuleWrapper curriculumModuleEnroledWrapper =
          (EnroledCurriculumModuleWrapper) degreeModuleToEvaluate;
      final CurriculumLine curriculumLine =
          (CurriculumLine) (curriculumModuleEnroledWrapper).getCurriculumModule();

      if (curriculumLine.isEnrolment()) {
        return curriculumLine.getExecutionPeriod() == executionSemester;
      }

      return false;
    }

    return false;
  }
 public static CurriculumLineLocationBean buildFrom(
     final CurriculumLine curriculumLine, final boolean withRules) {
   return new CurriculumLineLocationBean(
       curriculumLine, curriculumLine.getCurriculumGroup(), withRules);
 }