Package org.fenixedu.academic.domain

Examples of org.fenixedu.academic.domain.StudentCurricularPlan


        final Person person = userView.getPerson();
        final Registration registration = person.getStudentByType(degreeType);

        if (registration != null) {
            final StudentCurricularPlan studentCurricularPlan = registration.getLastStudentCurricularPlan();
            if (studentCurricularPlan != null) {
                final InfoStudentCurricularPlan infoStudentCurricularPlan = new InfoStudentCurricularPlan(studentCurricularPlan);
                return infoStudentCurricularPlan;
            }
        }
View Full Code Here


public class MoveCurriculumLines {

    @Atomic
    public static void run(final MoveCurriculumLinesBean moveCurriculumLinesBean) {
        final StudentCurricularPlan studentCurricularPlan = moveCurriculumLinesBean.getStudentCurricularPlan();
        if (moveCurriculumLinesBean.isWithRules()) {
            studentCurricularPlan.moveCurriculumLines(moveCurriculumLinesBean);
        } else {
            studentCurricularPlan.moveCurriculumLinesWithoutRules(AccessControl.getPerson(), moveCurriculumLinesBean);
        }
    }
View Full Code Here

    private static void processDegree(final Spreadsheet spreadsheet, final StudentReportPredicate studentReportPredicate,
            final Degree degree, final ExecutionYear executionYear) {
        for (final Registration registration : degree.getRegistrationsSet()) {
            if (studentReportPredicate.applyFor(registration)) {
                final StudentCurricularPlan studentCurricularPlan = registration.getLastStudentCurricularPlan();
                if (studentCurricularPlan != null) {
                    processStudentCurricularPlan(spreadsheet, studentCurricularPlan, executionYear);
                }
            }
        }
View Full Code Here

    public String getCurrentExecutionYearBeginDate() {
        if (registration.isInMobilityState()) {
            return readCurrentExecutionYear().getBeginDateYearMonthDay().toLocalDate().toString("dd-MM-yyyy");
        }

        StudentCurricularPlan lastStudentCurricularPlan = registration.getLastStudentCurricularPlan();
        TreeSet<Enrolment> orderedEnrolmentSet =
                new TreeSet<Enrolment>(Collections.reverseOrder(CurriculumModule.COMPARATOR_BY_CREATION_DATE));
        orderedEnrolmentSet.addAll(lastStudentCurricularPlan.getEnrolmentsByExecutionYear(readCurrentExecutionYear()));

        return orderedEnrolmentSet.isEmpty() ? "" : orderedEnrolmentSet.iterator().next().getCreationDateDateTime().toLocalDate()
                .toString("dd-MM-yyyy");
    }
View Full Code Here

        return lastRegistration.getCurricularYear(currentYear);
    }

    @Override
    public BigDecimal getCurrentYearEnrolledECTS() {
        StudentCurricularPlan lastStudentCurricularPlan = registration.getLastStudentCurricularPlan();
        return new BigDecimal(lastStudentCurricularPlan.getEnrolmentsEctsCredits(readCurrentExecutionYear()));
    }
View Full Code Here

    public Money getGratuityAmount() {
        if (!registration.hasToPayGratuityOrInsurance()) {
            return Money.ZERO;
        }

        StudentCurricularPlan lastStudentCurricularPlan = registration.getLastStudentCurricularPlan();

        GratuityEventWithPaymentPlan event =
                lastStudentCurricularPlan.getGratuityEvent(readCurrentExecutionYear(), GratuityEventWithPaymentPlan.class);

        return event != null ? event.getOriginalAmountToPay() : Money.ZERO;
    }
View Full Code Here

        } else {
            startDay = executionYear.getBeginDateYearMonthDay();
            executionSemester = executionYear.getFirstExecutionPeriod();
        }

        final StudentCurricularPlan scp =
                StudentCurricularPlan.createBolonhaStudentCurricularPlan(this, degreeCurricularPlan, startDay, executionSemester,
                        cycleType);

    }
View Full Code Here

        if (getStudentCurricularPlansSet().isEmpty()) {
            return Curriculum.createEmpty(executionYear);
        }

        if (getDegreeType().isBolonhaType()) {
            final StudentCurricularPlan studentCurricularPlan = getLastStudentCurricularPlan();
            if (studentCurricularPlan == null) {
                return Curriculum.createEmpty(executionYear);
            }

            if (cycleType == null) {
                return studentCurricularPlan.getCurriculum(when, executionYear);
            }

            final CycleCurriculumGroup cycleCurriculumGroup = studentCurricularPlan.getCycle(cycleType);
            if (cycleCurriculumGroup == null) {
                return Curriculum.createEmpty(executionYear);
            }

            return cycleCurriculumGroup.getCurriculum(when, executionYear);
        } else {
            final List<StudentCurricularPlan> sortedSCPs = getSortedStudentCurricularPlans();
            final ListIterator<StudentCurricularPlan> sortedSCPsIterator = sortedSCPs.listIterator(sortedSCPs.size());
            final StudentCurricularPlan lastStudentCurricularPlan = sortedSCPsIterator.previous();

            final ICurriculum curriculum;
            if (lastStudentCurricularPlan.isBoxStructure()) {
                curriculum = lastStudentCurricularPlan.getCurriculum(when, executionYear);

                for (; sortedSCPsIterator.hasPrevious();) {
                    final StudentCurricularPlan studentCurricularPlan = sortedSCPsIterator.previous();
                    if (executionYear == null || studentCurricularPlan.getStartExecutionYear().isBeforeOrEquals(executionYear)) {
                        ((Curriculum) curriculum).add(studentCurricularPlan.getCurriculum(when, executionYear));
                    }
                }

                return curriculum;
View Full Code Here

                && (isConcluded() || (isActive() && isInFinalDegreeForSeniority()));
    }

    public boolean isInFinalDegreeForSeniority() {
        int years = 0;
        final StudentCurricularPlan studentCurricularPlan = getLastStudentCurricularPlan();
        for (final CycleType type : getDegreeType().getCycleTypes()) {
            if (studentCurricularPlan.hasCycleCurriculumGroup(type)) {
                years += getDegreeType().getYears(type);
            }
        }
        return getCurricularYear() == years;
    }
View Full Code Here

        return false;
    }

    final public Collection<Enrolment> getEnrolments(final ExecutionYear executionYear) {
        final StudentCurricularPlan studentCurricularPlan = getStudentCurricularPlan(executionYear);
        return studentCurricularPlan != null ? studentCurricularPlan.getEnrolmentsByExecutionYear(executionYear) : Collections.EMPTY_LIST;
    }
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.domain.StudentCurricularPlan

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.