Package org.fenixedu.academic.domain

Examples of org.fenixedu.academic.domain.ExecutionSemester


        if (bean.getDegreeCurricularPlan() == null) {
            return new ArrayList<CurricularCourse>();
        }

        DegreeCurricularPlan degreeCurricularPlan = bean.getDegreeCurricularPlan();
        ExecutionSemester semester = bean.getSemester();

        return degreeCurricularPlan.getActiveCurricularCourses(semester);
    }
View Full Code Here


    public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
            throws Exception {

        final String executionPeriodIDString = request.getParameter("executionPeriodID");

        final ExecutionSemester selectedExecutionPeriod;
        if (executionPeriodIDString == null) {
            selectedExecutionPeriod = ExecutionSemester.readActualExecutionSemester();
        } else if (executionPeriodIDString.isEmpty()) {
            selectedExecutionPeriod = null;
        } else {
            selectedExecutionPeriod = FenixFramework.getDomainObject(executionPeriodIDString);
        }
        request.setAttribute("executionPeriod", selectedExecutionPeriod);

        final List<ExecutionCourse> executionCourses = new ArrayList<ExecutionCourse>();
        request.setAttribute("executionCourses", executionCourses);

        final Person person = AccessControl.getPerson();
        final SortedSet<ExecutionSemester> executionSemesters =
                new TreeSet<ExecutionSemester>(Ordering.from(ExecutionSemester.COMPARATOR_BY_SEMESTER_AND_YEAR).reverse());
        if (person != null) {
            for (final Professorship professorship : person.getProfessorshipsSet()) {
                final ExecutionCourse executionCourse = professorship.getExecutionCourse();
                final ExecutionSemester executionSemester = executionCourse.getExecutionPeriod();

                executionSemesters.add(executionSemester);
                if (selectedExecutionPeriod == null || selectedExecutionPeriod == executionSemester) {
                    executionCourses.add(executionCourse);
                }
View Full Code Here

        }
    }

    @EntryPoint
    public ActionForward prepare(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) {
        ExecutionSemester semester = getDomainObject(request, "semester");
        EnrolmentPeriodBean bean = new EnrolmentPeriodBean();
        if (semester != null) {
            bean.setSemester(semester);
        }
        request.setAttribute("executionSemester", bean);
View Full Code Here

        return mapping.findForward("showEnrolementPeriods");
    }

    public ActionForward prepareEditEnrolmentInstructions(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) throws Exception {
        ExecutionSemester semester = getDomainObject(request, "semester");
        EnrolmentInstructions.createIfNecessary(semester);
        request.setAttribute("executionSemester", semester);

        return mapping.findForward("editEnrolmentInstructions");
    }
View Full Code Here

        return mapping.findForward("editEnrolmentInstructions");
    }

    public ActionForward prepareChangePeriodValues(final ActionMapping mapping, final ActionForm form,
            final HttpServletRequest request, final HttpServletResponse response) {
        ExecutionSemester semester = getDomainObject(request, "semester");
        String periodOids = request.getParameter("periods");
        EnrolmentPeriodConfigurationForEdit conf = null;
        for (String periodOid : periodOids.split(":")) {
            EnrolmentPeriod period = FenixFramework.getDomainObject(periodOid);
            if (conf == null) {
View Full Code Here

        return mapping.findForward("showEnrolementPeriods");
    }

    public ActionForward prepareCreatePeriod(final ActionMapping mapping, final ActionForm form, HttpServletRequest request,
            final HttpServletResponse response) {
        ExecutionSemester semester = getDomainObject(request, "semester");
        EnrolmentPeriodConfigurationForCreation conf = new EnrolmentPeriodConfigurationForCreation(semester);
        request.setAttribute("configuration", conf);
        return mapping.findForward("createPeriod");
    }
View Full Code Here

        String personId = (String) personExecutionCourseForm.get("teacherId");
        Person person = Person.readPersonByUsername(personId);
        setChoosedExecutionPeriod(request, ReadNotClosedExecutionPeriods.run(), personExecutionCourseForm);
        InfoExecutionPeriod infoExecutionPeriod = (InfoExecutionPeriod) request.getAttribute("infoExecutionPeriod");
        final ExecutionSemester executionPeriod = infoExecutionPeriod.getExecutionPeriod();
        if (executionPeriod.getSemester().intValue() == 2 && executionPeriod.getExecutionYear().getYear().equals("2010/2011")) {
        } else {
            if (person.getTeacher() == null
                    || (!person.getTeacher().hasTeacherAuthorization(executionPeriod.getAcademicInterval()) && !person
                            .hasRole(RoleType.TEACHER))) {
                request.setAttribute("notAuth", true);
                return showExecutionYearExecutionPeriods(mapping, personExecutionCourseForm, request, response);
            }
        }
View Full Code Here

        final List<ExecutionDegree> executionDegrees =
                new ArrayList<ExecutionDegree>(ExecutionDegree.filterByAcademicInterval(contextSelectionBean
                        .getAcademicInterval()));
        Collections.sort(executionDegrees, executionDegreeComparator);
        request.setAttribute("executionDegrees", executionDegrees);
        ExecutionSemester executionSemester =
                (ExecutionSemester) ExecutionInterval.getExecutionInterval(contextSelectionBean.getAcademicInterval());
        request.setAttribute("executionSemester", executionSemester);

        AcademicCalendarEntry academicCalendarEntry = contextSelectionBean.getAcademicInterval().getAcademicCalendarEntry();
        while (!(academicCalendarEntry instanceof AcademicCalendarRootEntry)) {
            if (academicCalendarEntry instanceof AcademicYearCE) {
                ExecutionYear year = ExecutionYear.getExecutionYear((AcademicYearCE) academicCalendarEntry);
                request.setAttribute("executionYear", year);
                break;
            } else {
                academicCalendarEntry = academicCalendarEntry.getParentEntry();
            }
        }

        if (!executionSemester.isCurrent()) {
            request.setAttribute("noEditionAllowed", true);
        }

        return mapping.findForward("showForm");
    }
View Full Code Here

    public ActionForward chooseStudentById(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) throws Exception {

        final Registration registration = getDomainObject(request, "registrationId");
        final ExecutionSemester executionSemester = getDomainObject(request, "executionSemesterId");

        request.setAttribute("registration", registration);
        return new ShowStudentTimeTable().forwardToShowTimeTable(registration, mapping, request, executionSemester);
    }
View Full Code Here

    }

    @Atomic
    private Map<ExecutionDegree, Integer> setFirstYearShiftsCapacity(Boolean toBlock, ExecutionYear executionYear) {

        final ExecutionSemester executionSemester = executionYear.getFirstExecutionPeriod();

        final Map<Shift, Set<ExecutionDegree>> shiftsDegrees = new HashMap<Shift, Set<ExecutionDegree>>();
        final Set<Shift> shifts = new HashSet<Shift>();
        final Map<ExecutionDegree, Integer> modified = new HashMap<ExecutionDegree, Integer>();

        for (final Degree degree : Degree.readAllByDegreeType(DegreeType.BOLONHA_DEGREE,
                DegreeType.BOLONHA_INTEGRATED_MASTER_DEGREE)) {
            for (final DegreeCurricularPlan degreeCurricularPlan : degree.getActiveDegreeCurricularPlans()) {
                final ExecutionDegree executionDegree =
                        degreeCurricularPlan.getExecutionDegreeByAcademicInterval(executionSemester.getExecutionYear()
                                .getAcademicInterval());

                if (executionDegree != null) {
                    for (final SchoolClass schoolClass : executionDegree.getSchoolClassesSet()) {
                        if (schoolClass.getAnoCurricular().equals(FIRST_CURRICULAR_YEAR)
View Full Code Here

TOP

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

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.