Examples of InfoShift


Examples of org.fenixedu.academic.dto.InfoShift

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

            ContextUtils.setShiftContext(request);

            InfoShift infoShiftToDelete = (InfoShift) request.getAttribute(PresentationConstants.SHIFT);

            try {
                DeleteShift.run(infoShiftToDelete);
            } catch (FenixServiceException exception) {
                ActionErrors actionErrors = new ActionErrors();
View Full Code Here

Examples of org.fenixedu.academic.dto.InfoShift

    }

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

        InfoShift infoShiftToEdit = (InfoShift) request.getAttribute(PresentationConstants.SHIFT);

        DynaActionForm editShiftForm = (DynaActionForm) form;
        editShiftForm.set("courseInitials", infoShiftToEdit.getInfoDisciplinaExecucao().getSigla());
        editShiftForm.set("nome", infoShiftToEdit.getNome());
        editShiftForm.set("lotacao", infoShiftToEdit.getLotacao());
        editShiftForm.set("comment", infoShiftToEdit.getComment());

        List<ShiftType> shiftTypes = infoShiftToEdit.getShift().getTypes();
        String[] selectedshiftTypesArray = new String[shiftTypes.size()];

        for (int i = 0; i < shiftTypes.size(); i++) {
            ShiftType shiftType = shiftTypes.get(i);
            selectedshiftTypesArray[i] = shiftType.getName();
        }

        editShiftForm.set("shiftTiposAula", selectedshiftTypesArray);

        getExecutionCourses(request);

        readAndSetShiftTypes(request, infoShiftToEdit.getInfoDisciplinaExecucao());

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

Examples of org.fenixedu.academic.dto.InfoShift

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

        DynaActionForm editShiftForm = (DynaActionForm) form;
        InfoShift infoShiftToEdit = (InfoShift) request.getAttribute(PresentationConstants.SHIFT);
        InfoExecutionCourse infoExecutionCourse =
                RequestUtils.getExecutionCourseBySigla(request, (String) editShiftForm.get("courseInitials"));

        if (infoShiftToEdit.getInfoDisciplinaExecucao().getExecutionCourse().equals(infoExecutionCourse.getExecutionCourse())) {
            editShiftForm.set("courseInitials", infoShiftToEdit.getInfoDisciplinaExecucao().getSigla());
            editShiftForm.set("nome", infoShiftToEdit.getNome());

            List<ShiftType> shiftTypes = infoShiftToEdit.getShift().getTypes();
            String[] selectedshiftTypesArray = new String[shiftTypes.size()];
            for (int i = 0; i < shiftTypes.size(); i++) {
                ShiftType shiftType = shiftTypes.get(i);
                selectedshiftTypesArray[i] = shiftType.getName();
            }
            editShiftForm.set("shiftTiposAula", selectedshiftTypesArray);
            editShiftForm.set("lotacao", infoShiftToEdit.getLotacao());
            //editShiftForm.set("comment", infoShiftToEdit.getComment());

        } else {
            editShiftForm.set("shiftTiposAula", new String[] {});
            editShiftForm.set("lotacao", Integer.valueOf(0));
View Full Code Here

Examples of org.fenixedu.academic.dto.InfoShift

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

        DynaActionForm editShiftForm = (DynaActionForm) form;

        InfoShift infoShiftOld = (InfoShift) request.getAttribute(PresentationConstants.SHIFT);

        InfoExecutionCourse infoExecutionCourseNew =
                RequestUtils.getExecutionCourseBySigla(request, (String) editShiftForm.get("courseInitials"));
        InfoShiftEditor infoShiftNew = new InfoShiftEditor();
        infoShiftNew.setExternalId(infoShiftOld.getExternalId());
        infoShiftNew.setInfoDisciplinaExecucao(infoExecutionCourseNew);
        infoShiftNew.setInfoLessons(infoShiftOld.getInfoLessons());
        infoShiftNew.setLotacao((Integer) editShiftForm.get("lotacao"));
        infoShiftNew.setNome((String) editShiftForm.get("nome"));
        infoShiftNew.setComment((String) editShiftForm.get("comment"));

        String[] selectedShiftTypes = (String[]) editShiftForm.get("shiftTiposAula");
View Full Code Here

Examples of org.fenixedu.academic.dto.InfoShift

            HttpServletResponse response) throws Exception {

        ContextUtils.setClassContext(request);

        InfoClass infoClass = (InfoClass) request.getAttribute(PresentationConstants.CLASS_VIEW);
        InfoShift infoShift = (InfoShift) request.getAttribute(PresentationConstants.SHIFT);

        RemoverTurno.run(infoShift, infoClass);

        ContextUtils.setShiftContext(request);
        request.removeAttribute(PresentationConstants.CLASS_VIEW);
View Full Code Here

Examples of org.fenixedu.academic.dto.InfoShift

        List<String> classOIDs = new ArrayList<String>();
        for (String selectedClasse : selectedClasses) {
            classOIDs.add(selectedClasse);
        }

        InfoShift infoShift = (InfoShift) request.getAttribute(PresentationConstants.SHIFT);

        RemoveClasses.run(infoShift, classOIDs);

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

Examples of org.fenixedu.academic.dto.InfoShift

    }

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

        InfoShift infoShift = (InfoShift) request.getAttribute(PresentationConstants.SHIFT);

        ShiftKey shiftKey = new ShiftKey(infoShift.getNome(), infoShift.getInfoDisciplinaExecucao());

        List<InfoStudent> students = LerAlunosDeTurno.run(shiftKey);

        Collections.sort(students, new BeanComparator("number"));
View Full Code Here

Examples of org.fenixedu.academic.dto.InfoShift

            request.setAttribute("groupPropertiesCode", groupPropertiesCodeString);
            return mapping.findForward("viewStudentGroupInformation");
        }

        ArrayList shiftsList = new ArrayList();
        InfoShift oldInfoShift = infoSiteShifts.getOldShift();
        if (shifts.size() != 0) {
            shiftsList.add(new LabelValueBean("(escolher)", ""));
            InfoShift infoShift;
            Iterator iter = shifts.iterator();
            String label, value;
            List shiftValues = new ArrayList();
            while (iter.hasNext()) {
                infoShift = (InfoShift) iter.next();
                value = infoShift.getExternalId().toString();
                shiftValues.add(value);
                label = infoShift.getNome();
                shiftsList.add(new LabelValueBean(label, value));
            }
            if (shiftsList.size() == 1 && shiftValues.contains(oldInfoShift.getExternalId().toString())) {
                ActionErrors actionErrors4 = new ActionErrors();
                ActionError error4 = null;
View Full Code Here

Examples of org.fenixedu.academic.dto.InfoShift

        String shiftOIDString = (String) request.getAttribute(PresentationConstants.SHIFT_OID);
        if (shiftOIDString == null) {
            shiftOIDString = request.getParameter(PresentationConstants.SHIFT_OID);
        }

        InfoShift infoShift = null;

        if (shiftOIDString != null) {
            infoShift = ReadShiftByOID.run(shiftOIDString);

            if (infoShift != null) {
View Full Code Here

Examples of org.fenixedu.academic.dto.InfoShift

            } else {
                for (int i = 0; i < shifts.size(); i++) {
                    Shift shift = shifts.get(i);
                    if (strategy.checkShiftType(groupProperties, shift)) {
                        executionCourse = shift.getDisciplinaExecucao();
                        InfoShift infoShift = new InfoShift(shift);
                        infoShifts.add(infoShift);
                    }
                }
            }
        }
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.