Package org.fenixedu.academic.domain

Examples of org.fenixedu.academic.domain.CurricularCourse


    @Override
    protected void performEnrolments(Map<EnrolmentResultType, List<IDegreeModuleToEvaluate>> degreeModulesToEnrolMap) {
        for (final Entry<EnrolmentResultType, List<IDegreeModuleToEvaluate>> entry : degreeModulesToEnrolMap.entrySet()) {
            for (final IDegreeModuleToEvaluate degreeModuleToEvaluate : entry.getValue()) {
                if (degreeModuleToEvaluate.isEnroling() && degreeModuleToEvaluate.getDegreeModule().isCurricularCourse()) {
                    final CurricularCourse curricularCourse = (CurricularCourse) degreeModuleToEvaluate.getDegreeModule();

                    checkIDegreeModuleToEvaluate(curricularCourse);
                    new Enrolment(getStudentCurricularPlan(), degreeModuleToEvaluate.getCurriculumGroup(), curricularCourse,
                            getExecutionSemester(), EnrollmentCondition.VALIDATED, getResponsiblePerson().getUsername());
                }
View Full Code Here


        setState(thesis);
    }

    public String getSemester() {
        final Enrolment enrolment = getEnrolment();
        final CurricularCourse curricularCourse = enrolment.getCurricularCourse();
        return curricularCourse.isAnual() ? "" : enrolment.getExecutionPeriod().getSemester().toString();
    }
View Full Code Here

            return "COMPULSORY_ENROLMENT";
        }
    }

    public boolean isAnual() {
        final CurricularCourse curricularCourse = getCurricularCourse();
        return curricularCourse != null && curricularCourse.isAnual();
    }
View Full Code Here

    @Override
    protected RuleResult executeEnrolmentVerificationWithRules(ICurricularRule curricularRule,
            IDegreeModuleToEvaluate sourceDegreeModuleToEvaluate, EnrolmentContext enrolmentContext) {

        final CurricularCourse curricularCourse = (CurricularCourse) curricularRule.getDegreeModuleToApplyRule();
        final ExecutionSemester executionSemester = enrolmentContext.getExecutionPeriod();

        if (!curricularCourse.hasAnyActiveContext(enrolmentContext.getExecutionPeriod())) {
            return RuleResult.createNA(sourceDegreeModuleToEvaluate.getDegreeModule());
        }

        if (isApproved(enrolmentContext, curricularCourse, executionSemester.getPreviousExecutionPeriod())) {
            if (sourceDegreeModuleToEvaluate.isEnroled()) {
                return RuleResult.createImpossible(sourceDegreeModuleToEvaluate.getDegreeModule(),
                        "curricularRules.ruleExecutors.AssertUniqueApprovalInCurricularCourseContextsExecutor.already.approved",
                        curricularCourse.getName());
            } else {
                return RuleResult.createFalse(sourceDegreeModuleToEvaluate.getDegreeModule(),
                        "curricularRules.ruleExecutors.AssertUniqueApprovalInCurricularCourseContextsExecutor.already.approved",
                        curricularCourse.getName());
            }

        } else {
            return RuleResult.createTrue(sourceDegreeModuleToEvaluate.getDegreeModule());
        }
View Full Code Here

    }

    @Override
    protected RuleResult executeEnrolmentWithRulesAndTemporaryEnrolment(final ICurricularRule curricularRule,
            final IDegreeModuleToEvaluate sourceDegreeModuleToEvaluate, final EnrolmentContext enrolmentContext) {
        final CurricularCourse curricularCourse = (CurricularCourse) curricularRule.getDegreeModuleToApplyRule();
        final ExecutionSemester executionSemester = enrolmentContext.getExecutionPeriod();

        if (!curricularCourse.hasAnyActiveContext(enrolmentContext.getExecutionPeriod())) {
            return RuleResult.createNA(sourceDegreeModuleToEvaluate.getDegreeModule());
        }

        if (isApproved(enrolmentContext, curricularCourse, executionSemester.getPreviousExecutionPeriod())) {
            if (sourceDegreeModuleToEvaluate.isEnroled()) {
                return RuleResult.createImpossible(sourceDegreeModuleToEvaluate.getDegreeModule(),
                        "curricularRules.ruleExecutors.AssertUniqueApprovalInCurricularCourseContextsExecutor.already.approved",
                        curricularCourse.getName());
            } else {
                return RuleResult.createFalse(sourceDegreeModuleToEvaluate.getDegreeModule(),
                        "curricularRules.ruleExecutors.AssertUniqueApprovalInCurricularCourseContextsExecutor.already.approved",
                        curricularCourse.getName());
            }

        } else if (hasEnrolmentWithEnroledState(enrolmentContext, curricularCourse,
                executionSemester.getPreviousExecutionPeriod())) {
            return RuleResult.createTrue(EnrolmentResultType.TEMPORARY, sourceDegreeModuleToEvaluate.getDegreeModule());
View Full Code Here

        final Integer semester = getIntegerFromRequest(request, "semester");
        final AcademicInterval academicInterval =
                AcademicInterval.getAcademicIntervalFromResumedString(request.getParameter("academicInterval"));

        final CurricularCourse curricularCourse = getDomainObject(request, "curricularCourseCode");

        final AcademicInterval interval =
                curricularCourse.isAnual() ? academicInterval : academicInterval.getChildAcademicInterval(
                        AcademicPeriod.SEMESTER, semester);

        request.setAttribute("infoCurriculumHistoricReport", new InfoCurriculumHistoricReport(interval, curricularCourse));

        return mapping.findForward("show-report");
View Full Code Here

        for (final ExecutionDegree executionDegree : executionYear.getExecutionDegreesSet()) {
            final DegreeCurricularPlan degreeCurricularPlan = executionDegree.getDegreeCurricularPlan();
            degreeCurricularPlan.applyToCurricularCourses(executionYear, new org.apache.commons.collections.Predicate() {
                @Override
                public boolean evaluate(final Object arg0) {
                    final CurricularCourse curricularCourse = (CurricularCourse) arg0;
                    if (curricularCourse.isDissertation()) {
                        if (!curricularCourses.contains(curricularCourse)) {
                            curricularCourses.add(curricularCourse);
                            for (final CurriculumModule curriculumModule : curricularCourse.getCurriculumModulesSet()) {
                                if (curriculumModule.isEnrolment()) {
                                    final Enrolment enrolment = (Enrolment) curriculumModule;
                                    if (enrolment.getExecutionYear() == executionYear) {
                                        final ThesisPresentationState state =
                                                ThesisPresentationState.getThesisPresentationState(enrolment);
View Full Code Here

        Dismissal dismissal = dismissals.iterator().next();
        if (dismissals.size() == 1) {
            if (dismissal instanceof OptionalDismissal || dismissal instanceof CreditsDismissal) {
                return EctsTableIndex.convertGradeToEcts(scp.getDegree(), dismissal, grade, processingDate);
            } else {
                CurricularCourse curricularCourse = dismissal.getCurricularCourse();
                if (curricularCourse != null) {
                    return EctsTableIndex.convertGradeToEcts(curricularCourse, dismissal, grade, processingDate);
                } else {
                    return EctsTableIndex.convertGradeToEcts(scp.getDegree(), dismissal, grade, processingDate);
                }
View Full Code Here

    @Override
    protected void performEnrolments(Map<EnrolmentResultType, List<IDegreeModuleToEvaluate>> degreeModulesToEnrolMap) {
        for (final Entry<EnrolmentResultType, List<IDegreeModuleToEvaluate>> entry : degreeModulesToEnrolMap.entrySet()) {
            for (final IDegreeModuleToEvaluate degreeModuleToEvaluate : entry.getValue()) {
                if (degreeModuleToEvaluate.isEnroling() && degreeModuleToEvaluate.getDegreeModule().isCurricularCourse()) {
                    final CurricularCourse curricularCourse = (CurricularCourse) degreeModuleToEvaluate.getDegreeModule();

                    checkIDegreeModuleToEvaluate(curricularCourse);
                    new Enrolment(getStudentCurricularPlan(), degreeModuleToEvaluate.getCurriculumGroup(), curricularCourse,
                            getExecutionSemester(), EnrollmentCondition.VALIDATED, getResponsiblePerson().getUsername());
                }
View Full Code Here

    @Override
    protected void performEnrolments(Map<EnrolmentResultType, List<IDegreeModuleToEvaluate>> degreeModulesToEnrolMap) {
        for (final Entry<EnrolmentResultType, List<IDegreeModuleToEvaluate>> entry : degreeModulesToEnrolMap.entrySet()) {
            for (final IDegreeModuleToEvaluate degreeModuleToEvaluate : entry.getValue()) {
                if (degreeModuleToEvaluate.isEnroling() && degreeModuleToEvaluate.getDegreeModule().isCurricularCourse()) {
                    final CurricularCourse curricularCourse = (CurricularCourse) degreeModuleToEvaluate.getDegreeModule();

                    checkIDegreeModuleToEvaluate(curricularCourse);
                    new Enrolment(getStudentCurricularPlan(), degreeModuleToEvaluate.getCurriculumGroup(), curricularCourse,
                            getExecutionSemester(), EnrollmentCondition.VALIDATED, getResponsiblePerson().getUsername());
                }
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.domain.CurricularCourse

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.