Examples of InfoExecutionPeriod


Examples of org.fenixedu.academic.dto.InfoExecutionPeriod

        anosCurriculares.add(new LabelValueBean("5", "5"));
        request.setAttribute("curricularYearList", anosCurriculares);

        // If executionPeriod was previously selected,form has that value as
        // default
        InfoExecutionPeriod selectedExecutionPeriod =
                (InfoExecutionPeriod) request.getAttribute(PresentationConstants.EXECUTION_PERIOD);
        if (selectedExecutionPeriod != null) {
            indexForm.set("indice", selectedExecutionPeriod.getInfoExecutionYear().getExternalId());
            indexForm.set("curYear", Integer.valueOf(anosCurriculares.indexOf(anosCurriculares.iterator().next())));
            request.setAttribute(PresentationConstants.EXECUTION_PERIOD, selectedExecutionPeriod);
            request.setAttribute(PresentationConstants.EXECUTION_PERIOD_OID, selectedExecutionPeriod.getExternalId().toString());
        }

        InfoExecutionDegree infoExecutionDegree =
                ReadPublicExecutionDegreeByDCPID.run(degreeCurricularPlanId, (String) indexForm.get("indice"));
        if (infoExecutionDegree == null) {
View Full Code Here

Examples of org.fenixedu.academic.dto.InfoExecutionPeriod

            super.execute(mapping, form, request, response);
        } catch (Exception e1) {
            logger.error(e1.getMessage(), e1);
        }

        InfoExecutionPeriod infoExecutionPeriod =
                (InfoExecutionPeriod) request.getAttribute(PresentationConstants.EXECUTION_PERIOD);

        InfoExecutionDegree infoExecutionDegree =
                RequestUtils.getExecutionDegreeFromRequest(request, infoExecutionPeriod.getInfoExecutionYear());

        Integer curricularYear = (Integer) request.getAttribute("curYear");

        List infoExecutionCourses = (List) SelectExecutionCourse.run(infoExecutionDegree, infoExecutionPeriod, curricularYear);
        Collections.sort(infoExecutionCourses, new BeanComparator("nome"));
View Full Code Here

Examples of org.fenixedu.academic.dto.InfoExecutionPeriod

        // indice
        String indice = getFromRequest("indice", request);
        request.setAttribute("indice", indice);

        InfoExecutionPeriod infoExecutionPeriod =
                (InfoExecutionPeriod) request.getAttribute(PresentationConstants.EXECUTION_PERIOD);
        request.setAttribute(PresentationConstants.EXECUTION_PERIOD, infoExecutionPeriod);
        request.setAttribute(PresentationConstants.EXECUTION_PERIOD_OID, infoExecutionPeriod.getExternalId().toString());

        // executionDegreeID
        String executionDegreeId = getFromRequest("executionDegreeID", request);
        request.setAttribute("executionDegreeID", executionDegreeId);
View Full Code Here

Examples of org.fenixedu.academic.dto.InfoExecutionPeriod

    }

    public static final InfoExecutionCourse getExecutionCourseFromRequest(HttpServletRequest request)
            throws FenixActionException, FenixServiceException {
        InfoExecutionCourse infoExecutionCourse = null;
        InfoExecutionPeriod infoExecutionPeriod = getExecutionPeriodFromRequest(request);
        String code = request.getParameter("exeCode");

        infoExecutionCourse = (InfoExecutionCourse) ReadExecutionCourse.run(infoExecutionPeriod, code);
        return infoExecutionCourse;
    }
View Full Code Here

Examples of org.fenixedu.academic.dto.InfoExecutionPeriod

        }
        return infoExecutionYear;
    }

    public static final InfoExecutionPeriod getExecutionPeriodFromRequest(HttpServletRequest request) throws FenixActionException {
        InfoExecutionPeriod infoExecutionPeriod = null;
        InfoExecutionYear infoExecutionYear;
        try {
            infoExecutionYear = getExecutionYearFromRequest(request);
        } catch (FenixServiceException e) {
            throw new FenixActionException(e);
View Full Code Here

Examples of org.fenixedu.academic.dto.InfoExecutionPeriod

        return mapping.findForward("final-step");
    }

    private List getExecutionDegrees(HttpServletRequest request) throws FenixServiceException {
        InfoExecutionPeriod infoExecutionPeriod = (InfoExecutionPeriod) request.getAttribute("infoExecutionPeriod");

        List<InfoExecutionDegree> executionDegrees =
                ReadExecutionDegreesByExecutionYearAndDegreeType.run(infoExecutionPeriod.getInfoExecutionYear().getYear(), null);

        ComparatorChain comparatorChain = new ComparatorChain();

        comparatorChain.addComparator(new BeanComparator("infoDegreeCurricularPlan.infoDegree.tipoCurso"));
        comparatorChain.addComparator(new BeanComparator("infoDegreeCurricularPlan.infoDegree.nome"));
View Full Code Here

Examples of org.fenixedu.academic.dto.InfoExecutionPeriod

            executionPeriodIdValue = (String) personExecutionCourseForm.get("executionPeriodId");
        } catch (Exception e) {
            // do nothing
        }
        final String executionPeriodId = executionPeriodIdValue;
        InfoExecutionPeriod infoExecutionPeriod = null;
        if (executionPeriodId == null) {
            infoExecutionPeriod = (InfoExecutionPeriod) CollectionUtils.find(executionPeriodsNotClosed, new Predicate() {

                @Override
                public boolean evaluate(Object input) {
                    InfoExecutionPeriod infoExecutionPeriod = (InfoExecutionPeriod) input;

                    return infoExecutionPeriod.getState().equals(PeriodState.CURRENT);
                }
            });
        } else {
            infoExecutionPeriod = (InfoExecutionPeriod) CollectionUtils.find(executionPeriodsNotClosed, new Predicate() {

                @Override
                public boolean evaluate(Object input) {
                    InfoExecutionPeriod infoExecutionPeriod = (InfoExecutionPeriod) input;

                    return infoExecutionPeriod.getExternalId().equals(executionPeriodId);
                }
            });

        }
        request.setAttribute("infoExecutionPeriod", infoExecutionPeriod);
View Full Code Here

Examples of org.fenixedu.academic.dto.InfoExecutionPeriod

        DynaValidatorForm personExecutionCourseForm = (DynaValidatorForm) form;

        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))) {
View Full Code Here

Examples of org.fenixedu.academic.dto.InfoExecutionPeriod

        return mapping.findForward("prepare");
    }

    private InfoExecutionPeriod setExecutionContext(HttpServletRequest request) throws Exception {
        InfoExecutionPeriod infoExecutionPeriod =
                (InfoExecutionPeriod) request.getAttribute(PresentationConstants.INFO_EXECUTION_PERIOD_KEY);
        if (infoExecutionPeriod == null) {
            User userView = Authenticate.getUser();
            infoExecutionPeriod = ReadCurrentExecutionPeriod.run();
            request.setAttribute(PresentationConstants.INFO_EXECUTION_PERIOD_KEY, infoExecutionPeriod);
View Full Code Here

Examples of org.fenixedu.academic.dto.InfoExecutionPeriod

    public ActionForward preparePublic(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) throws Exception {
        String inputPage = request.getParameter(PresentationConstants.INPUT_PAGE);

        InfoExecutionPeriod infoExecutionPeriod =
                (InfoExecutionPeriod) request.getAttribute(PresentationConstants.EXECUTION_PERIOD);

        // TODO: this semester and curricular year list needs to be refactored
        // in order to incorporate masters
        /* Criar o bean de semestres */
        List<LabelValueBean> semestres = new ArrayList<LabelValueBean>();
        semestres.add(new LabelValueBean("escolher", ""));
        semestres.add(new LabelValueBean("1 �", "1"));
        semestres.add(new LabelValueBean("2 �", "2"));
        request.setAttribute("semestres", semestres);

        /* Criar o bean de anos curricutares */
        List<LabelValueBean> anosCurriculares = new ArrayList<LabelValueBean>();
        anosCurriculares.add(new LabelValueBean("escolher", ""));
        anosCurriculares.add(new LabelValueBean("1 �", "1"));
        anosCurriculares.add(new LabelValueBean("2 �", "2"));
        anosCurriculares.add(new LabelValueBean("3 �", "3"));
        anosCurriculares.add(new LabelValueBean("4 �", "4"));
        anosCurriculares.add(new LabelValueBean("5 �", "5"));
        request.setAttribute("curricularYearList", anosCurriculares);

        /* Cria o form bean com as licenciaturas em execucao. */

        List executionDegreeList = ReadExecutionDegreesByExecutionYear.run(infoExecutionPeriod.getInfoExecutionYear());

        List<LabelValueBean> licenciaturas = new ArrayList<LabelValueBean>();

        licenciaturas.add(new LabelValueBean("escolher", ""));

View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.