Examples of Enrolment


Examples of org.fenixedu.academic.domain.Enrolment

    public Curriculum getCurriculum(final Dismissal dismissal, final DateTime when, final ExecutionYear year) {

        Curriculum curriculum = Curriculum.createEmpty(year);

        for (final EnrolmentWrapper wrapper : getEnrolmentsSet()) {
            final Enrolment enrolment = (Enrolment) wrapper.getIEnrolment();

            if (enrolment.wasCreated(when) && isBefore(enrolment, year)) {
                curriculum.add(new Curriculum(dismissal, year, Collections.singleton((ICurriculumEntry) enrolment), Collections
                        .<ICurriculumEntry> emptySet(), Collections.singleton((ICurriculumEntry) enrolment)));
            }
        }
View Full Code Here

Examples of org.fenixedu.academic.domain.Enrolment

            for (final Thesis thesis : degree.getThesisSet()) {
                if (state != null && thesis.getState() != state) {
                    continue;
                }

                final Enrolment enrolment = thesis.getEnrolment();
                if (enrolment != null) {
                    final ExecutionYear executionYear = enrolment.getExecutionYear();

                    if (year != null && executionYear != year) {
                        continue;
                    }
View Full Code Here

Examples of org.fenixedu.academic.domain.Enrolment

    @Override
    protected void unEnrol() {
        for (final CurriculumModule curriculumModule : enrolmentContext.getToRemove()) {
            if (curriculumModule instanceof Enrolment) {
                final Enrolment enrolment = (Enrolment) curriculumModule;
                enrolment.unEnrollImprovement(getExecutionSemester());
            } else {
                throw new DomainException(
                        "StudentCurricularPlanImprovementOfApprovedEnrolmentManager.can.only.manage.enrolment.evaluations.of.enrolments");
            }
        }
View Full Code Here

Examples of org.fenixedu.academic.domain.Enrolment

            if (degreeModuleToEvaluate.isEnroled() && degreeModuleToEvaluate.canCollectRules()) {
                final EnroledCurriculumModuleWrapper moduleEnroledWrapper =
                        (EnroledCurriculumModuleWrapper) degreeModuleToEvaluate;

                if (moduleEnroledWrapper.getCurriculumModule() instanceof Enrolment) {
                    final Enrolment enrolment = (Enrolment) moduleEnroledWrapper.getCurriculumModule();
                    result.put(degreeModuleToEvaluate,
                            Collections.<ICurricularRule> singleton(new ImprovementOfApprovedEnrolment(enrolment)));

                } else {
                    throw new DomainException(
View Full Code Here

Examples of org.fenixedu.academic.domain.Enrolment

                if (degreeModuleToEvaluate.isEnroled()) {
                    final EnroledCurriculumModuleWrapper moduleEnroledWrapper =
                            (EnroledCurriculumModuleWrapper) degreeModuleToEvaluate;

                    if (moduleEnroledWrapper.getCurriculumModule() instanceof Enrolment) {
                        final Enrolment enrolment = (Enrolment) moduleEnroledWrapper.getCurriculumModule();
                        toCreate.add(enrolment);
                    } else {
                        throw new DomainException(
                                "StudentCurricularPlanImprovementOfApprovedEnrolmentManager.can.only.manage.enrolment.evaluations.of.enrolments");
                    }
View Full Code Here

Examples of org.fenixedu.academic.domain.Enrolment

    }

    @Override
    final public Enrolment findEnrolmentFor(final CurricularCourse curricularCourse, final ExecutionSemester executionSemester) {
        for (final CurriculumModule curriculumModule : getCurriculumModulesSet()) {
            final Enrolment search = curriculumModule.findEnrolmentFor(curricularCourse, executionSemester);
            if (search != null) {
                return search;
            }
        }
        return null;
View Full Code Here

Examples of org.fenixedu.academic.domain.Enrolment

    }

    @Override
    final public Enrolment getApprovedEnrolment(final CurricularCourse curricularCourse) {
        for (final CurriculumModule curriculumModule : getCurriculumModulesSet()) {
            final Enrolment enrolment = curriculumModule.getApprovedEnrolment(curricularCourse);
            if (enrolment != null) {
                return enrolment;
            }
        }
        return null;
View Full Code Here

Examples of org.fenixedu.academic.domain.Enrolment

    final public int getNumberOfChildEnrolments(final ExecutionSemester executionSemester) {
        int result = 0;
        for (final CurriculumModule curriculumModule : getCurriculumModulesSet()) {
            if (curriculumModule instanceof Enrolment) {
                final Enrolment enrolment = (Enrolment) curriculumModule;
                if (enrolment.isValid(executionSemester) && enrolment.isEnroled()) {
                    result++;
                }
            }
        }
        return result;
View Full Code Here

Examples of org.fenixedu.academic.domain.Enrolment

    public boolean hasEnrolmentInCurricularCourseBefore(final CurricularCourse curricularCourse,
            final ExecutionSemester executionSemester) {
        for (final CurriculumModule curriculumModule : getCurriculumModulesSet()) {
            if (curriculumModule.isEnrolment()) {
                final Enrolment enrolment = (Enrolment) curriculumModule;
                if (!enrolment.isAnnulled() && enrolment.getExecutionPeriod().isBefore(executionSemester)
                        && enrolment.getCurricularCourse() == curricularCourse) {
                    return true;
                }
            } else if (curriculumModule instanceof CurriculumGroup) {
                final CurriculumGroup curriculumGroup = (CurriculumGroup) curriculumModule;
                if (curriculumGroup.hasEnrolmentInCurricularCourseBefore(curricularCourse, executionSemester)) {
View Full Code Here

Examples of org.fenixedu.academic.domain.Enrolment

    public int calculateStudentAcumulatedEnrollments(CurricularCourse curricularCourse, ExecutionSemester executionSemester) {
        int result = 0;
        for (final CurriculumModule curriculumModule : getCurriculumModulesSet()) {
            if (curriculumModule.isEnrolment()) {
                final Enrolment enrolment = (Enrolment) curriculumModule;
                if (!enrolment.isAnnulled()
                        && enrolment.getExecutionPeriod().isBefore(executionSemester)
                        && enrolment.getCurricularCourse().getCurricularCourseUniqueKeyForEnrollment()
                                .equalsIgnoreCase(curricularCourse.getCurricularCourseUniqueKeyForEnrollment())) {
                    result++;
                }
            } else if (curriculumModule instanceof CurriculumGroup) {
                final CurriculumGroup curriculumGroup = (CurriculumGroup) curriculumModule;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.