Package org.fenixedu.academic.domain.degreeStructure

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


            if (contextList.isEmpty()) {
                continue;
            }

            Context selectedContext = contextList.iterator().next(); // WTF?.. /facepalm

            CurriculumGroup curriculumGroup = null;
            if (selectedCurricularCourse.getDegreeCurricularPlan().equals(degreeCurricularPlan)) {
                curriculumGroup = studentCurricularPlan.getRoot().findCurriculumGroupFor(selectedContext.getParentCourseGroup());
            } else {
                // Enrol on standalone curriculum group
                curriculumGroup = studentCurricularPlan.getStandaloneCurriculumGroup();
            }
View Full Code Here


                year = YEAR_TEXT + years.iterator().next();
            }

            semester = SEMESTER_TEXT + "2";
        } else if (course.getParentContextsSet().size() == 1) {
            Context context = course.getParentContextsSet().iterator().next();
            year = YEAR_TEXT + context.getCurricularYear();
            semester = SEMESTER_TEXT + (context.containsSemester(1) ? "1" : "2");
        } else {
            TreeSet<Integer> years = new TreeSet<Integer>();
            TreeSet<Integer> semesters = new TreeSet<Integer>();
            for (Context context : course.getParentContextsSet()) {
                years.add(context.getCurricularYear());
                semesters.add(context.containsSemester(1) ? 1 : 2);
            }
            if (years.size() == 1) {
                year = YEAR_TEXT + years.iterator().next();
            }
            if (semesters.size() == 1) {
View Full Code Here

        setPrerequisites(prerequisites);
        setPrerequisitesEn(prerequisitesEn);
        setCurricularStage(curricularStage);
        setCompetenceCourse(competenceCourse);
        setType(CurricularCourseType.NORMAL_COURSE);
        new Context(parentCourseGroup, this, curricularPeriod, beginExecutionPeriod, endExecutionPeriod);
    }
View Full Code Here

                        (DegreeModuleScopeCurricularCourseScope) degreeModuleScope;
                final Branch branch = degreeModuleScopeCurricularCourseScope.getCurricularCourseScope().getBranch();
                return branch == null ? " " : branch.getName();
            } else {
                final DegreeModuleScopeContext degreeModuleScopeContext = (DegreeModuleScopeContext) degreeModuleScope;
                final Context context = degreeModuleScopeContext.getContext();
                return context.getParentCourseGroup().getName();
            }
        } else {
            return null;
        }
    }
View Full Code Here

    private void removeCurricularCoursesThatCanBeApprovedInOtherCurricularPeriodOLD(final double missingEctsToConcludeGroup,
            final Map<CurricularPeriod, Set<Context>> childContextsWithMaxByCurricularPeriod,
            final SortedSet<Context> sortedCurricularCoursesContexts, final EnrolmentContext enrolmentContext) {
        final Iterator<Context> iterator = sortedCurricularCoursesContexts.iterator();
        while (iterator.hasNext()) {
            final Context context = iterator.next();

            if (canObtainApprovalInOtherCurricularPeriod(missingEctsToConcludeGroup, context,
                    childContextsWithMaxByCurricularPeriod)) {
                iterator.remove();
            }
View Full Code Here

            final Map<CurricularPeriod, Set<Context>> childContextsWithMaxByCurricularPeriod,
            final EnrolmentContext enrolmentContext, final IDegreeModuleToEvaluate sourceDegreeModuleToEvaluate,
            final boolean withTemporaryEnrolments) {
        final Iterator<Context> iterator = sortedCurricularCoursesContexts.iterator();
        while (iterator.hasNext()) {
            final Context context = iterator.next();
            final CurricularCourse curricularCourse = (CurricularCourse) context.getChildDegreeModule();
            if (isApproved(enrolmentContext, curricularCourse)) {
                iterator.remove();
                removeFromChildContextsByCurricularPeriod(childContextsWithMaxByCurricularPeriod, context);

            } else if (isEnroled(enrolmentContext, curricularCourse, withTemporaryEnrolments)
View Full Code Here

        final DegreeModule degreeModule = contextToRemove.getChildDegreeModule();

        for (final Entry<CurricularPeriod, Set<Context>> each : result.entrySet()) {
            final Iterator<Context> iterator = each.getValue().iterator();
            while (iterator.hasNext()) {
                Context candidate = iterator.next();
                if (candidate.getChildDegreeModule() == degreeModule) {
                    iterator.remove();
                }
            }
        }
View Full Code Here

                if (degreeModuleToEvaluate.isAnnualCurricularCourse(enrolmentContext.getExecutionPeriod().getExecutionYear())
                        && degreeModuleToEvaluate.getContext() == null) {
                    continue;
                }

                final Context context = degreeModuleToEvaluate.getContext();
                if (context == null) {
                    throw new DomainException("error.degreeModuleToEvaluate.has.invalid.context",
                            degreeModuleToEvaluate.getName(), degreeModuleToEvaluate.getExecutionPeriod().getQualifiedName());
                }
View Full Code Here

    protected void encodeCurricularRules(final HtmlTable groupTable, final CurriculumGroup curriculumGroup) {
        if (curriculumGroup.isNoCourseGroupCurriculumGroup()) {
            return;
        }
        final Context context = getDegreeModuleContext(curriculumGroup, getBolonhaStudentEnrollmentBean().getExecutionPeriod());
        final List<CurricularRule> curricularRules =
                curriculumGroup.getDegreeModule().getCurricularRules(context,
                        getBolonhaStudentEnrollmentBean().getExecutionPeriod());
        if (!curricularRules.isEmpty()) {
            encodeCurricularRules(groupTable, curricularRules);
View Full Code Here

            } else if (curriculumGroups.isEmpty() && !courseGroupsToEnrol.isEmpty()) {
                generateCourseGroupToEnroll(blockContainer, courseGroupsToEnrol.iterator().next(), studentCurricularPlan, depth
                        + getRenderer().getWidthDecreasePerLevel());
                courseGroupsToEnrol.remove(0);
            } else {
                Context context = courseGroupsToEnrol.iterator().next().getContext();
                CurriculumGroup curriculumGroup = curriculumGroups.iterator().next().getCurriculumModule();
                if (curriculumGroup.getChildOrder(executionSemester) <= context.getChildOrder()) {
                    generateGroup(blockContainer, studentCurricularPlan, curriculumGroups.iterator().next(), executionSemester,
                            depth + getRenderer().getWidthDecreasePerLevel());
                    curriculumGroups.remove(0);
                } else {
                    generateCourseGroupToEnroll(blockContainer, courseGroupsToEnrol.iterator().next(), studentCurricularPlan,
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.