Package org.fenixedu.academic.domain

Examples of org.fenixedu.academic.domain.ExecutionDegree


        String executionCourseId = RequestUtils.getAndSetStringToRequest(request, "executionCourseId");
        String originExecutionDegreeId = RequestUtils.getAndSetStringToRequest(request, "originExecutionDegreeId");
        String[] shiftIdsToTransfer = (String[]) dynaActionForm.get("shiftIdsToTransfer");
        String[] curricularCourseIdsToTransfer = (String[]) dynaActionForm.get("curricularCourseIdsToTransfer");
        ExecutionDegree originExecutionDegree = FenixFramework.getDomainObject(originExecutionDegreeId);
        ExecutionCourse originExecutionCourse = FenixFramework.getDomainObject(executionCourseId);
        String originExecutionDegreesString = originExecutionCourse.getDegreePresentationString();

        try {

            ExecutionCourse destinationExecutionCourse =
                    SeperateExecutionCourse.run(executionCourseId, null, shiftIdsToTransfer, curricularCourseIdsToTransfer);

            String destinationExecutionCourseName = destinationExecutionCourse.getNameI18N().getContent();
            if (StringUtils.isEmpty(destinationExecutionCourseName)) {
                destinationExecutionCourseName = destinationExecutionCourse.getName();
            }
            String destinationExecutionCourseCode = destinationExecutionCourse.getSigla();
            String destinationDegreeName = destinationExecutionCourse.getDegreePresentationString();
            String transferedCurricularCourses = makeObjectStringFromArray(curricularCourseIdsToTransfer, CurricularCourse.class);
            String transferedShifts;

            String successKey;
            if (shiftIdsToTransfer.length == 0) {
                successKey = "message.manager.executionCourseManagement.separate.success.create.noShifts";
                transferedShifts = "";
            } else {
                successKey = "message.manager.executionCourseManagement.separate.success.create";
                transferedShifts = makeObjectStringFromArray(shiftIdsToTransfer, Shift.class);
            }
            addActionMessage("success", request, successKey, destinationExecutionCourseName, destinationDegreeName,
                    destinationExecutionCourseCode, transferedCurricularCourses, transferedShifts);

            // check if degree context has changed
            if (!originExecutionCourse.getExecutionDegrees().contains(originExecutionDegree)) {
                // origin execution course degree has changed (no longer on original degree)
                String originCourseName = originExecutionCourse.getNameI18N().getContent();
                if (StringUtils.isEmpty(originCourseName)) {
                    originCourseName = originExecutionCourse.getName();
                }
                addActionMessage("info", request, "message.manager.executionCourseManagement.separate.success.switchContext",
                        originCourseName, originExecutionDegreesString, originExecutionCourse.getDegreePresentationString(),
                        destinationExecutionCourseName, destinationExecutionCourse.getDegreePresentationString(),
                        originExecutionDegree.getDegree().getSigla());
                request.setAttribute("executionCourseId", destinationExecutionCourse.getExternalId().toString());
            }

        } catch (DomainException e) {
            addActionMessage("error", request, e.getMessage(), e.getArgs());
View Full Code Here


        this.executionPeriodDomainReference = executionSemester;
    }

    public Collection<ExecutionCourse> search(final Collection<ExecutionCourse> result) {
        final ExecutionSemester executionSemester = getExecutionPeriod();
        final ExecutionDegree executionDegree = getExecutionDegree();
        if (executionSemester == null || executionDegree == null) {
            return null;
        }
        for (final ExecutionCourse executionCourse : executionSemester.getAssociatedExecutionCoursesSet()) {
            if (matchesCriteria(executionSemester, executionDegree, executionCourse)) {
View Full Code Here

        RequestUtils.setExecutionPeriodToRequest(request, infoExecutionPeriod);
        request.setAttribute(PresentationConstants.EXECUTION_PERIOD, infoExecutionPeriod);
        request.setAttribute(PresentationConstants.EXECUTION_PERIOD_OID, infoExecutionPeriod.getExternalId().toString());

        final ExecutionSemester executionSemester = FenixFramework.getDomainObject(infoExecutionPeriod.getExternalId());
        ExecutionDegree executionDegree = null;

        if (degreeCurricularPlan != null) {
            executionDegree = degreeCurricularPlan.getExecutionDegreeByYear(executionSemester.getExecutionYear());
            if (executionDegree == null) {
                executionDegree = degreeCurricularPlan.getMostRecentExecutionDegree();

                if (executionDegree != null) {
                    infoExecutionPeriod =
                            InfoExecutionPeriod.newInfoFromDomain(executionDegree.getExecutionYear().getExecutionSemesterFor(1));
                    request.setAttribute("indice", infoExecutionPeriod.getExternalId());
                    chooseExamContextoForm.set("indice", infoExecutionPeriod.getExternalId());
                    RequestUtils.setExecutionPeriodToRequest(request, infoExecutionPeriod);
                    request.setAttribute(PresentationConstants.EXECUTION_PERIOD, infoExecutionPeriod);
                    request.setAttribute(PresentationConstants.EXECUTION_PERIOD_OID, infoExecutionPeriod.getExternalId()
View Full Code Here

    }

    @Override
    public ExecutionDegree getExecutionDegree() {
        if (semester != null && degreeCurricularPlan != null) {
            ExecutionDegree degree = degreeCurricularPlan.getExecutionDegreeByAcademicInterval(semester.getAcademicInterval());

            return degree;
        }

        return null;
View Full Code Here

        return mapping.findForward("viewExamsMap");
    }

    private InfoExecutionDegree findLatestInfoExecutionDegree(DegreeCurricularPlan degreeCurricularPlan) {
        final Set<ExecutionDegree> executionDegrees = degreeCurricularPlan.getExecutionDegreesSet();
        final ExecutionDegree executionDegree =
                Collections.max(executionDegrees, ExecutionDegree.EXECUTION_DEGREE_COMPARATORY_BY_YEAR);
        return new InfoExecutionDegree(executionDegree);
    }
View Full Code Here

        if (!chooseNotLinked) {
            String executionDegreeId = (String) request.getAttribute("executionDegreeId");
            String curricularYearId = (String) request.getAttribute("curYearId");

            ExecutionDegree executionDegree = FenixFramework.getDomainObject(executionDegreeId);
            CurricularYear curYear = FenixFramework.getDomainObject(curricularYearId);

            sessionBean.setExecutionDegree(executionDegree);
            sessionBean.setCurricularYear(curYear);
        }
View Full Code Here

            HttpServletResponse response) {

        final DynaActionForm form = (DynaActionForm) actionForm;
        final String executionDegreeID = (String) form.get("executionDegreeID");
        if (!StringUtils.isEmpty(executionDegreeID)) {
            final ExecutionDegree executionDegree = FenixFramework.getDomainObject(executionDegreeID);

            request.setAttribute("executionDegree", executionDegree);
            setResponsibleCoordinatorsIDs(executionDegree, form);
            return mapping.findForward("manageCoordinators");
View Full Code Here

            HttpServletResponse response) {

        final DynaActionForm form = (DynaActionForm) actionForm;
        final String executionDegreeID = (String) form.get("executionDegreeID");
        if (!StringUtils.isEmpty(executionDegreeID)) {
            final ExecutionDegree executionDegree = FenixFramework.getDomainObject(executionDegreeID);

            request.setAttribute("executionDegree", executionDegree);
            request.setAttribute("executionYears", ExecutionYear.readNotClosedExecutionYears());
            request.setAttribute("campus", Space.getAllCampus());

            form.set("executionYearID", executionDegree.getExecutionYear().getExternalId());
            form.set("campusID", executionDegree.getCampus().getExternalId());

            final String dateFormat = "dd/MM/yyyy";
            form.set("periodLessonsFirstSemesterBegin", executionDegree.getPeriodLessonsFirstSemester().getStartYearMonthDay()
                    .toString(dateFormat));
            form.set("periodLessonsFirstSemesterEnd", executionDegree.getPeriodLessonsFirstSemester().getEndYearMonthDay()
                    .toString(dateFormat));
            form.set("periodExamsFirstSemesterBegin", executionDegree.getPeriodExamsFirstSemester().getStartYearMonthDay()
                    .toString(dateFormat));
            form.set("periodExamsFirstSemesterEnd",
                    executionDegree.getPeriodExamsFirstSemester().getEndYearMonthDay().toString(dateFormat));
            form.set("periodLessonsSecondSemesterBegin", executionDegree.getPeriodLessonsSecondSemester().getStartYearMonthDay()
                    .toString(dateFormat));
            form.set("periodLessonsSecondSemesterEnd", executionDegree.getPeriodLessonsSecondSemester().getEndYearMonthDay()
                    .toString(dateFormat));
            form.set("periodExamsSecondSemesterBegin", executionDegree.getPeriodExamsSecondSemester().getStartYearMonthDay()
                    .toString(dateFormat));
            form.set("periodExamsSecondSemesterEnd", executionDegree.getPeriodExamsSecondSemester().getEndYearMonthDay()
                    .toString(dateFormat));

            // not all executionDegrees have these periods defined, but should!
            if (executionDegree.getPeriodExamsSpecialSeason() != null) {
                form.set("periodExamsSpecialSeasonBegin", executionDegree.getPeriodExamsSpecialSeason().getStartYearMonthDay()
                        .toString(dateFormat));
                form.set("periodExamsSpecialSeasonEnd", executionDegree.getPeriodExamsSpecialSeason().getEndYearMonthDay()
                        .toString(dateFormat));
            }
            if (executionDegree.getPeriodGradeSubmissionNormalSeasonFirstSemester() != null) {
                form.set("periodGradeSubmissionNormalSeasonFirstSemesterEnd", executionDegree
                        .getPeriodGradeSubmissionNormalSeasonFirstSemester().getEndYearMonthDay().toString(dateFormat));
            }
            if (executionDegree.getPeriodGradeSubmissionNormalSeasonSecondSemester() != null) {
                form.set("periodGradeSubmissionNormalSeasonSecondSemesterEnd", executionDegree
                        .getPeriodGradeSubmissionNormalSeasonSecondSemester().getEndYearMonthDay().toString(dateFormat));
            }
            if (executionDegree.getPeriodGradeSubmissionSpecialSeason() != null) {
                form.set("periodGradeSubmissionSpecialSeasonEnd", executionDegree.getPeriodGradeSubmissionSpecialSeason()
                        .getEndYearMonthDay().toString(dateFormat));
            }
        }
        return mapping.findForward("editExecutionDegree");
    }
View Full Code Here

        addHeader(spreadsheet, phase);

        for (Degree degree : degrees) {
            for (final DegreeCurricularPlan degreeCurricularPlan : degree.getActiveDegreeCurricularPlans()) {

                final ExecutionDegree executionDegree = degreeCurricularPlan.getExecutionDegreeByAcademicInterval(executionYear);

                if (executionDegree != null) {
                    for (final SchoolClass schoolClass : executionDegree.getSchoolClassesSet()) {
                        if (schoolClass.getAnoCurricular().equals(Integer.valueOf(1))
                                && schoolClass.getExecutionPeriod().isFirstOfYear()) {

                            for (final Shift shift : schoolClass.getAssociatedShiftsSet()) {
View Full Code Here

    public void setExecutionDegree(ExecutionDegree executionDegree) {
        this.executionDegree = executionDegree;
    }

    public ExecutionDegree getPreviousExecutionDegree() {
        final ExecutionDegree executionDegree = getExecutionDegree();
        if (executionDegree != null) {
            final ExecutionYear executionYear = executionDegree.getExecutionYear();
            final ExecutionYear previousExecutionYear = executionYear.getPreviousExecutionYear();
            if (previousExecutionYear != null) {
                final DegreeCurricularPlan degreeCurricularPlan = executionDegree.getDegreeCurricularPlan();
                for (final ExecutionDegree otherExecutionDegree : degreeCurricularPlan.getExecutionDegreesSet()) {
                    if (otherExecutionDegree.getExecutionYear() == previousExecutionYear) {
                        return otherExecutionDegree;
                    }
                }
View Full Code Here

TOP

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

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.