Package org.fenixedu.academic.domain.degreeStructure

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


    }

    protected IDegreeModuleToEvaluate buildDegreeModuleToEnrolForCycle(StudentCurricularPlan scp, CycleType cycleType,
            ExecutionSemester semester) {
        final CycleCourseGroup cycleCourseGroup = scp.getCycleCourseGroup(cycleType);
        final Context context = cycleCourseGroup.getParentContextsByExecutionSemester(semester).iterator().next();
        return new DegreeModuleToEnrol(scp.getRoot(), context, semester);
    }
View Full Code Here


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

            final Context context = (Context) converter.convert(type, parts[0]);
            final CurriculumGroup curriculumGroup = (CurriculumGroup) converter.convert(type, parts[1]);
            final ExecutionSemester executionSemester = (ExecutionSemester) converter.convert(type, parts[2]);
            final CurricularCourse curricularCourse = (CurricularCourse) converter.convert(type, parts[3]);
            result.add(new OptionalDegreeModuleToEnrol(curriculumGroup, context, executionSemester, curricularCourse));
        }
View Full Code Here

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

            final Context context = (Context) converter.convert(type, parts[0]);
            final CurriculumGroup curriculumGroup = (CurriculumGroup) converter.convert(type, parts[1]);
            final ExecutionSemester executionSemester = (ExecutionSemester) converter.convert(type, parts[2]);
            result.add(new DegreeModuleToEnrol(curriculumGroup, context, executionSemester));
        }
View Full Code Here

        }
        return context;
    }

    private void findContext() {
        Context result = null;

        final CurriculumGroup parent = getCurriculumModule().getCurriculumGroup();
        if (parent.getDegreeModule() != null) {
            for (final Context context : parent.getDegreeModule().getValidChildContexts(getExecutionPeriod())) {
                if (context.getChildDegreeModule() == getDegreeModule()) {
                    if (result == null || context.getCurricularYear().intValue() < result.getCurricularYear().intValue()) {
                        result = context;
                    }
                }
            }
        }
View Full Code Here

        final CourseGroup courseGroup = (CourseGroup) FenixFramework.getDomainObject(courseGroupID);
        if (courseGroup == null) {
            throw new FenixServiceException("error.noCourseGroup");
        }
        final Context context = FenixFramework.getDomainObject(contextID);
        if (context == null && !courseGroup.isRoot()) {
            throw new FenixServiceException("error.noContext");
        }

        courseGroup.edit(name, nameEn, context, getBeginExecutionPeriod(beginExecutionPeriodID),
View Full Code Here

    public static void run(final String degreeModuleID, final String contextID) throws FenixServiceException {
        final DegreeModule degreeModule = FenixFramework.getDomainObject(degreeModuleID);
        if (degreeModule == null) {
            throw new FenixServiceException("error.noDegreeModule");
        }
        final Context context = FenixFramework.getDomainObject(contextID);
        if (context == null) {
            throw new FenixServiceException("error.noCourseGroup");
        }
        degreeModule.deleteContext(context);
    }
View Full Code Here

    public static void run(final String contextID, final Integer position) throws FenixServiceException {
        if (contextID == null) {
            throw new FenixServiceException();
        }

        final Context context = FenixFramework.getDomainObject(contextID);
        if (context == null) {
            throw new FenixServiceException("error.noContext");
        }

        context.getParentCourseGroup().orderChild(context, position);
    }
View Full Code Here

                } else if (curriculumGroups.isEmpty() && !courseGroupsToEnrol.isEmpty()) {
                    generateCourseGroupToEnroll(blockContainer, courseGroupsToEnrol.iterator().next(), depth
                            + getWidthDecreasePerLevel());
                    courseGroupsToEnrol.remove(0);
                } else {
                    Context context = courseGroupsToEnrol.iterator().next().getContext();
                    CurriculumGroup curriculumGroup = (CurriculumGroup) curriculumGroups.iterator().next().getCurriculumModule();
                    if (curriculumGroup.getChildOrder(executionSemester) <= context.getChildOrder()) {
                        generateModules(blockContainer, studentCurricularPlan, curriculumGroups.iterator().next(),
                                executionSemester, depth + getWidthDecreasePerLevel());
                        curriculumGroups.remove(0);
                    } else {
                        generateCourseGroupToEnroll(blockContainer, courseGroupsToEnrol.iterator().next(), depth
View Full Code Here

    @Override
    protected ExecutionSemester getMinimumExecutionPeriod() {
        CourseGroup courseGroup = getCourseGroup(getParentCourseGroupID());;
        if (courseGroup == null) {
            final Context context = getContext(getContextID());
            if (context != null) {
                courseGroup = context.getParentCourseGroup();
            }
        }
        return (courseGroup == null) ? null : courseGroup.getMinimumExecutionPeriod();
    }
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.domain.degreeStructure.Context

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.