Examples of DegreeModule


Examples of org.fenixedu.academic.domain.degreeStructure.DegreeModule

        final List<SelectItem> result = new ArrayList<SelectItem>();
        final List<List<DegreeModule>> degreeModulesSet =
                getDegreeCurricularPlan().getDcpDegreeModulesIncludingFullPath(CourseGroup.class, null);
        final Set<CourseGroup> allParents = getCourseGroup(getParentCourseGroupID()).getAllParentCourseGroups();
        for (final List<DegreeModule> degreeModules : degreeModulesSet) {
            final DegreeModule lastDegreeModule = (degreeModules.size() > 0) ? degreeModules.get(degreeModules.size() - 1) : null;
            if (!allParents.contains(lastDegreeModule) && lastDegreeModule != getCourseGroup(getParentCourseGroupID())) {
                final StringBuilder pathName = new StringBuilder();
                for (final DegreeModule degreeModule : degreeModules) {
                    pathName.append((pathName.length() == 0) ? "" : " > ").append(degreeModule.getName());
                }
                result.add(new SelectItem(lastDegreeModule.getExternalId(), pathName.toString()));
            }
        }
        Collections.sort(result, new BeanComparator("label"));
        result.add(0, new SelectItem(this.NO_SELECTION_STRING, BundleUtil.getString(Bundle.BOLONHA, "choose")));
        return result;
View Full Code Here

Examples of org.fenixedu.academic.domain.degreeStructure.DegreeModule

        }
        return executionSemester;
    }

    private boolean haveAllSameDegreeModule(CurricularRule... curricularRules) {
        DegreeModule degreeModule = curricularRules[0].getDegreeModuleToApplyRule();
        for (CurricularRule rule : curricularRules) {
            if (!rule.getDegreeModuleToApplyRule().equals(degreeModule)) {
                return false;
            }
        }
View Full Code Here

Examples of org.fenixedu.academic.domain.degreeStructure.DegreeModule

    }

    private static CurricularRule createExclusiveness(DegreeModule firstExclusiveDegreeModule, ExecutionSemester begin,
            ExecutionSemester end, CurricularRuleParametersDTO parametersDTO) {

        final DegreeModule secondExclusiveDegreeModule =
                FenixFramework.getDomainObject(parametersDTO.getSelectedDegreeModuleID());
        final CourseGroup contextCourseGroup =
                (CourseGroup) FenixFramework.getDomainObject(parametersDTO.getContextCourseGroupID());

        final Exclusiveness firstRule =
View Full Code Here

Examples of org.fenixedu.academic.domain.degreeStructure.DegreeModule

    }

    private static CurricularRule createRestrictionBetweenDegreeModules(DegreeModule toApplyRule, ExecutionSemester begin,
            ExecutionSemester end, CurricularRuleParametersDTO parametersDTO) {

        final DegreeModule precedenceDegreeModule = FenixFramework.getDomainObject(parametersDTO.getSelectedDegreeModuleID());
        final CourseGroup contextCourseGroup =
                (CourseGroup) FenixFramework.getDomainObject(parametersDTO.getContextCourseGroupID());

        return new RestrictionBetweenDegreeModules(toApplyRule, precedenceDegreeModule, parametersDTO.getMinimumCredits(),
                contextCourseGroup, begin, end);
View Full Code Here

Examples of org.fenixedu.academic.domain.degreeStructure.DegreeModule

    }

    private static CurricularRule createRestrictionEnroledDegreeModule(DegreeModule toApplyRule, ExecutionSemester begin,
            ExecutionSemester end, CurricularRuleParametersDTO parametersDTO) {

        final DegreeModule enroledDegreeModule = FenixFramework.getDomainObject(parametersDTO.getSelectedDegreeModuleID());
        final CourseGroup contextCourseGroup =
                (CourseGroup) FenixFramework.getDomainObject(parametersDTO.getContextCourseGroupID());

        return new RestrictionEnroledDegreeModule((CurricularCourse) toApplyRule, (CurricularCourse) enroledDegreeModule,
                contextCourseGroup, parametersDTO.getCurricularPeriodInfoDTO(), begin, end);
View Full Code Here

Examples of org.fenixedu.academic.domain.degreeStructure.DegreeModule

    }

    private static CurricularRule createRestrictionNotEnroledDegreeModule(DegreeModule toApplyRule, ExecutionSemester begin,
            ExecutionSemester end, CurricularRuleParametersDTO parametersDTO) {

        final DegreeModule notEnroledDegreeModule = FenixFramework.getDomainObject(parametersDTO.getSelectedDegreeModuleID());
        final CourseGroup contextCourseGroup =
                (CourseGroup) FenixFramework.getDomainObject(parametersDTO.getContextCourseGroupID());

        return new RestrictionNotEnroledDegreeModule((CurricularCourse) toApplyRule, (CurricularCourse) notEnroledDegreeModule,
                contextCourseGroup, parametersDTO.getCurricularPeriodInfoDTO(), begin, end);
View Full Code Here

Examples of org.fenixedu.academic.domain.degreeStructure.DegreeModule

    }

    private static CurricularRule createRestrictionDoneDegreeModule(DegreeModule toApplyRule, ExecutionSemester begin,
            ExecutionSemester end, CurricularRuleParametersDTO parametersDTO) {

        final DegreeModule done = FenixFramework.getDomainObject(parametersDTO.getSelectedDegreeModuleID());
        final CourseGroup contextCourseGroup =
                (CourseGroup) FenixFramework.getDomainObject(parametersDTO.getContextCourseGroupID());

        return new RestrictionDoneDegreeModule((CurricularCourse) toApplyRule, (CurricularCourse) done, contextCourseGroup,
                parametersDTO.getCurricularPeriodInfoDTO(), begin, end);
View Full Code Here

Examples of org.fenixedu.academic.domain.degreeStructure.DegreeModule

        return getCurricularCourse().getAssociatedExecutionCoursesSet().contains(executionCourse)
                && getExecutionPeriod() != executionCourse.getExecutionPeriod();
    }

    final public boolean isImprovingInExecutionPeriodFollowingApproval(final ExecutionSemester improvementExecutionPeriod) {
        final DegreeModule degreeModule = getDegreeModule();
        if (hasImprovement() || !isApproved() || !degreeModule.hasAnyParentContexts(improvementExecutionPeriod)) {
            throw new DomainException("Enrolment.is.not.in.improvement.conditions");
        }

        final ExecutionSemester enrolmentExecutionPeriod = getExecutionPeriod();
        if (improvementExecutionPeriod.isBeforeOrEquals(enrolmentExecutionPeriod)) {
            throw new DomainException("Enrolment.cannot.improve.enrolment.prior.to.its.execution.period");
        }

        ExecutionSemester enrolmentNextExecutionPeriod = enrolmentExecutionPeriod.getNextExecutionPeriod();
        if (improvementExecutionPeriod == enrolmentNextExecutionPeriod) {
            return true;
        }

        for (ExecutionSemester executionSemester = enrolmentNextExecutionPeriod; executionSemester != null
                && executionSemester != improvementExecutionPeriod; executionSemester =
                executionSemester.getNextExecutionPeriod()) {
            if (degreeModule.hasAnyParentContexts(executionSemester)) {
                return false;
            }
        }

        return true;
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.