Package org.fenixedu.academic.domain.studentCurriculum

Examples of org.fenixedu.academic.domain.studentCurriculum.CurriculumModule


            return rule.hasMinimumCredits() ? createFalseRuleResultWithInvalidEcts(rule, sourceDegreeModuleToEvaluate) : RuleResult
                    .createTrue(sourceDegreeModuleToEvaluate.getDegreeModule());

        } else if (isEnroled(enrolmentContext, precedenceDegreeModule)) {

            final CurriculumModule curriculumModule = searchCurriculumModule(enrolmentContext, precedenceDegreeModule);

            if (!rule.hasMinimumCredits() || rule.allowCredits(curriculumModule.getAprovedEctsCredits())) {
                return RuleResult.createTrue(sourceDegreeModuleToEvaluate.getDegreeModule());
            } else {
                if (sourceDegreeModuleToEvaluate.isEnroled() && sourceDegreeModuleToEvaluate.isLeaf()) {
                    return createImpossibleRuleResultWithInvalidEcts(rule, sourceDegreeModuleToEvaluate);
                } else {
View Full Code Here


            if (!rule.hasMinimumCredits()) {
                return RuleResult.createTrue(sourceDegreeModuleToEvaluate.getDegreeModule());
            }

            final CurriculumModule curriculumModule = searchCurriculumModule(enrolmentContext, precedenceDegreeModule);
            Double ectsCredits = curriculumModule.getAprovedEctsCredits();

            if (rule.allowCredits(ectsCredits)) {
                return RuleResult.createTrue(sourceDegreeModuleToEvaluate.getDegreeModule());
            }

            final ExecutionSemester executionSemester = enrolmentContext.getExecutionPeriod();
            ectsCredits =
                    Double.valueOf(ectsCredits.doubleValue()
                            + curriculumModule.getEnroledEctsCredits(executionSemester.getPreviousExecutionPeriod())
                                    .doubleValue());

            if (rule.allowCredits(ectsCredits)) {
                return RuleResult.createTrue(EnrolmentResultType.TEMPORARY, sourceDegreeModuleToEvaluate.getDegreeModule());
View Full Code Here

                    getStudentCurricularPlanEquivalencePlan(request, student);
            if (studentCurricularPlanEquivalencePlan != null) {
                request.setAttribute("studentCurricularPlanEquivalencePlan", studentCurricularPlanEquivalencePlan);
                final DegreeCurricularPlan degreeCurricularPlan =
                        (DegreeCurricularPlan) request.getAttribute("selectedDegreeCurricularPlan");
                final CurriculumModule curriculumModule = getCurriculumModule(request);
                request.setAttribute("equivalencePlanEntryWrappers", studentCurricularPlanEquivalencePlan
                        .getEquivalencePlanEntryWrappers(degreeCurricularPlan, curriculumModule));
            }
        }
        return mapping.findForward("showPlan");
View Full Code Here

            studentEquivalencyPlanEntryCreator =
                    new StudentEquivalencyPlanEntryCreator(studentCurricularPlanEquivalencePlan,
                            degreeCurricularPlan.getEquivalencePlan());
        }

        final CurriculumModule curriculumModule = getCurriculumModule(request);
        if (curriculumModule != null) {
            studentEquivalencyPlanEntryCreator.setOriginDegreeModuleToAdd(curriculumModule.getDegreeModule());
            studentEquivalencyPlanEntryCreator.addOrigin(curriculumModule.getDegreeModule());
        }

        request.setAttribute("studentEquivalencyPlanEntryCreator", studentEquivalencyPlanEntryCreator);
        return mapping.findForward("addEquivalency");
    }
View Full Code Here

            final IDegreeModuleToEvaluate degreeModuleToEvaluate = searchDegreeModuleToEvaluate(enrolmentContext, rule);
            if (degreeModuleToEvaluate.isEnroled()) {

                final EnroledCurriculumModuleWrapper moduleEnroledWrapper =
                        (EnroledCurriculumModuleWrapper) degreeModuleToEvaluate;
                final CurriculumModule curriculumModule = moduleEnroledWrapper.getCurriculumModule();

                final Double ectsCredits =
                        curriculumModule.getAprovedEctsCredits()
                                + curriculumModule.getEnroledEctsCredits(enrolmentContext.getExecutionPeriod())
                                + calculateEctsCreditsFromToEnrolCurricularCourses(enrolmentContext, curriculumModule);

                if (rule.creditsExceedMaximum(ectsCredits)) {
                    if (sourceDegreeModuleToEvaluate.isEnroled() && sourceDegreeModuleToEvaluate.isLeaf()) {
                        return createImpossibleResult(rule, sourceDegreeModuleToEvaluate, ectsCredits);
View Full Code Here

            final IDegreeModuleToEvaluate degreeModuleToEvaluate = searchDegreeModuleToEvaluate(enrolmentContext, rule);
            if (degreeModuleToEvaluate.isEnroled()) {
                final EnroledCurriculumModuleWrapper moduleEnroledWrapper =
                        (EnroledCurriculumModuleWrapper) degreeModuleToEvaluate;
                final CurriculumModule curriculumModule = moduleEnroledWrapper.getCurriculumModule();
                final ExecutionSemester executionSemester = enrolmentContext.getExecutionPeriod();

                Double ectsCredits =
                        curriculumModule.getAprovedEctsCredits() + curriculumModule.getEnroledEctsCredits(executionSemester)
                                + calculateEctsCreditsFromToEnrolCurricularCourses(enrolmentContext, curriculumModule);

                if (rule.creditsExceedMaximum(ectsCredits)) {
                    if (sourceDegreeModuleToEvaluate.isEnroled() && sourceDegreeModuleToEvaluate.isLeaf()) {
                        return createImpossibleResult(rule, sourceDegreeModuleToEvaluate, ectsCredits);
                    } else {
                        return createFalseRuleResult(rule, sourceDegreeModuleToEvaluate, ectsCredits);
                    }
                }

                ectsCredits =
                        Double.valueOf(ectsCredits.doubleValue()
                                + curriculumModule.getEnroledEctsCredits(executionSemester.getPreviousExecutionPeriod())
                                        .doubleValue());

                // TODO: remove duplicated ects from anual CurricularCourses

                if (rule.creditsExceedMaximum(ectsCredits)) {
                    return RuleResult.createTrue(EnrolmentResultType.TEMPORARY, sourceDegreeModuleToEvaluate.getDegreeModule(),
                            "curricularRules.ruleExecutors.CreditsLimitExecutor.exceeded.maximum.credits.limit",
                            ectsCredits.toString(), rule.getMaximumCredits().toString(), curriculumModule.getName().getContent());
                } else {
                    return RuleResult.createTrue(sourceDegreeModuleToEvaluate.getDegreeModule());
                }

            } else { // is enrolling now
View Full Code Here

            String[] parts = key.split(",");
            if (parts.length < 2) {
                throw new ConversionException("invalid key format: " + key);
            }

            final CurriculumModule curriculumModule = (CurriculumModule) converter.convert(type, parts[0]);
            final ExecutionSemester executionSemester = (ExecutionSemester) converter.convert(type, parts[1]);
            result.add(new EnroledCurriculumModuleWrapper(curriculumModule, executionSemester));
        }

        return result;
View Full Code Here

            throw new DomainException("error.unknown.curriculumLine");
        }
    }

    private void moveEnrolment(final Enrolment enrolment, final CurriculumGroup parent) {
        final CurriculumModule child = parent.getChildCurriculumModule(enrolment.getDegreeModule());
        if (child != null && child.isEnrolment()) {
            final Enrolment childEnrolment = (Enrolment) child;
            if (childEnrolment.getExecutionPeriod() == enrolment.getExecutionPeriod()) {
                throw new DomainException("error.SeparationCyclesManagement.enrolment.should.not.exist.for.same.executionPeriod");
            }
        }
View Full Code Here

    private CycleType getCycleType() {
        if (!hasCurriculumModule() || !isBolonha()) {
            return null;
        }

        final CurriculumModule module = getCurriculumModule();
        final CycleType cycleType = module.isCycleCurriculumGroup() ? ((CycleCurriculumGroup) module).getCycleType() : null;
        return cycleType;
    }
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.domain.studentCurriculum.CurriculumModule

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.