Package org.fenixedu.academic.domain

Examples of org.fenixedu.academic.domain.ExecutionYear$ExecutionYearSearchCache


        return new BigDecimal(getRegistration().getEnrolmentsEcts(currentYear));
    }

    public BigDecimal getNumberOfEnrolledEctsOneYearAgo() {
        ExecutionYear oneYearAgo = getForExecutionYear().getPreviousExecutionYear();
        BigDecimal result = BigDecimal.ZERO;

        if (student == null) {
            return BigDecimal.ZERO;
        }
View Full Code Here


        return result;
    }

    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;
    }
View Full Code Here

        }

        List<ExecutionYear> enrolmentsExecutionYears = new ArrayList<ExecutionYear>(getEnrolmentsExecutionYears(getStudent()));
        Collections.sort(enrolmentsExecutionYears, ExecutionYear.REVERSE_COMPARATOR_BY_YEAR);

        ExecutionYear lastEnrolledExecutionYear = null;

        if (enrolmentsExecutionYears.isEmpty()) {
            return "";
        }

        if (enrolmentsExecutionYears.size() == 1
                && ExecutionYear.readCurrentExecutionYear().equals(enrolmentsExecutionYears.iterator().next())) {
            return "";
        } else if (ExecutionYear.readCurrentExecutionYear().equals(enrolmentsExecutionYears.iterator().next())) {
            lastEnrolledExecutionYear = enrolmentsExecutionYears.get(1);
        } else {
            lastEnrolledExecutionYear = enrolmentsExecutionYears.iterator().next();
        }

        return ((Integer) lastEnrolledExecutionYear.getBeginCivilYear()).toString();
    }
View Full Code Here

    private void reportGraduate(final Spreadsheet sheet, final ConclusionProcess conclusionProcess) {
        final Row row = sheet.addRow();

        final Registration registration = conclusionProcess.getRegistration();
        final ExecutionYear ingression = conclusionProcess.getIngressionYear();
        final ExecutionYear conclusion = conclusionProcess.getConclusionYear();
        final LocalDate conclusionDate = conclusionProcess.getConclusionDate();

        row.setCell(registration.getNumber());
        row.setCell(registration.getName());
        setDegreeCells(row, registration.getDegree());
        if (conclusionProcess.isCycleConclusionProcess()) {
            row.setCell(((CycleConclusionProcess) conclusionProcess).getCycleType().getDescription());
        } else {
            row.setCell(StringUtils.EMPTY);
        }
        row.setCell(registration.getPrecedentDegreeConclusionGrade(SchoolLevelType.SECOND_CYCLE_BASIC_SCHOOL));
        row.setCell(registration.getEntryGrade() != null ? registration.getEntryGrade().toString() : StringUtils.EMPTY);
        row.setCell(ingression.getYear());
        row.setCell(conclusion == null ? StringUtils.EMPTY : conclusion.getYear());
        row.setCell(conclusionDate == null ? StringUtils.EMPTY : conclusionDate.toString("yyyy-MM-dd"));
        row.setCell(conclusion == null ? StringUtils.EMPTY : String.valueOf(ingression.getDistanceInCivilYears(conclusion) + 1));
        row.setCell(conclusionProcess.getFinalAverage());

        setPersonCells(registration, row);
View Full Code Here

    }

    @Override
    public void renderReport(Spreadsheet spreadsheet) throws Exception {

        ExecutionYear executionYear = getExecutionYear();
        createHeaders(spreadsheet);

        logger.info("BEGIN report for " + getDegreeType().name());
        int count = 0;

        for (final StudentCurricularPlan studentCurricularPlan : getStudentCurricularPlansToProcess(executionYear)) {
            final Registration registration = studentCurricularPlan.getRegistration();

            if (registration != null && !registration.isTransition()) {
                for (final CycleType cycleType : registration.getDegreeType().getCycleTypes()) {
                    final CycleCurriculumGroup cycleCGroup = studentCurricularPlan.getRoot().getCycleCurriculumGroup(cycleType);
                    if (cycleCGroup != null && !cycleCGroup.isExternal()) {
                        final RegistrationConclusionBean registrationConclusionBean =
                                new RegistrationConclusionBean(registration, cycleCGroup);
                        ExecutionYear conclusionYear = null;
                        if (cycleCGroup.isConcluded()) {
                            conclusionYear = registrationConclusionBean.getConclusionYear();

                            if (conclusionYear != executionYear && conclusionYear != executionYear.getPreviousExecutionYear()) {
                                continue;
View Full Code Here

        ExecutionDegreeCoordinatorsBean sessionBean = getRenderedObject("sessionBean");
        if (sessionBean == null) {
            sessionBean = new ExecutionDegreeCoordinatorsBean();
            final String executionYearId = String.valueOf(request.getParameter("executionYearId"));
            if (!executionYearId.equals("null")) {
                ExecutionYear executionYear = FenixFramework.getDomainObject(executionYearId);
                sessionBean.setExecutionYear(executionYear);
            } else {
                request.setAttribute("sessionBean", sessionBean);
                RenderUtils.invalidateViewState("sessionBean");
View Full Code Here

            request.setAttribute("degreeID", thesis.getDegree().getExternalId());
            request.setAttribute("executionYearID", thesis.getExecutionYear().getExternalId());
        }

        Degree degree = getDegree(request);
        ExecutionYear executionYear = getExecutionYear(request);

        setFilterContext(request, degree, executionYear);

        return super.execute(mapping, actionForm, request, response);
    }
View Full Code Here

    public ActionForward listThesis(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) throws Exception {
        ThesisContextBean bean = getContextBean(request);

        Degree degree = bean.getDegree();
        ExecutionYear executionYear = bean.getExecutionYear();

        setFilterContext(request, degree, executionYear);

        List<Thesis> theses = new ArrayList<Thesis>();
View Full Code Here

    public ActionForward listScientificComission(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) throws Exception {
        final Degree degree = getDomainObject(request, "degreeId");
        request.setAttribute("degree", degree);

        final ExecutionYear executionYear = getDomainObject(request, "executionYearId");
        request.setAttribute("executionYear", executionYear);

        if (degree == null || executionYear == null) {
            return listThesis(mapping, actionForm, request, response);
        }
View Full Code Here

        if (bean != null) {
            return bean;
        } else {
            Degree degree = getDegree(request);
            ExecutionYear executionYear = getExecutionYear(request);

            if (executionYear == null) {
                executionYear = ExecutionYear.readCurrentExecutionYear();
            }
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.domain.ExecutionYear$ExecutionYearSearchCache

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.