Examples of InfoExecutionCourse


Examples of org.fenixedu.academic.dto.InfoExecutionCourse

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

Examples of org.fenixedu.academic.dto.InfoExecutionCourse

        if (students != null && !students.isEmpty()) {
            request.setAttribute(PresentationConstants.STUDENT_LIST, students);
        }

        InfoExecutionCourse infoExecutionCourse =
                (InfoExecutionCourse) request.getAttribute(PresentationConstants.EXECUTION_COURSE);

        List<InfoShift> shifts = LerTurnosDeDisciplinaExecucao.run(infoExecutionCourse);

        if (shifts != null && !shifts.isEmpty()) {
View Full Code Here

Examples of org.fenixedu.academic.dto.InfoExecutionCourse

        }

        InfoSiteProjects viewProjectsComponent =
                ReadExecutionCourseProjects.run(executionCourseCodeString, userView.getUsername());

        InfoExecutionCourse infoExecutionCourse = ReadExecutionCourseByOID.run(executionCourseCodeString);
        request.setAttribute("infoExecutionCourse", infoExecutionCourse);

        InfoSiteProjects infoSiteProjects = viewProjectsComponent;
        List infoGroupPropertiesList = new ArrayList();
        if (infoSiteProjects != null) {
View Full Code Here

Examples of org.fenixedu.academic.dto.InfoExecutionCourse

        String executionCourseOID = null;
        if (executionCourseOIDString != null && !executionCourseOIDString.equals("") && !executionCourseOIDString.equals("null")) {
            executionCourseOID = executionCourseOIDString;
        }

        InfoExecutionCourse infoExecutionCourse = null;

        if (executionCourseOID != null) {
            infoExecutionCourse = ReadExecutionCourseByOID.run(executionCourseOID);

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

Examples of org.fenixedu.academic.dto.InfoExecutionCourse

        if (infoExamsMap != null
                && infoExamsMap.getInfoExecutionDegree() != null
                && infoExamsMap.getInfoExecutionDegree().isPublishedExam(
                        infoExamsMap.getInfoExecutionPeriod().getExecutionPeriod())) {
            for (Object element : infoExamsMap.getExecutionCourses()) {
                InfoExecutionCourse infoExecutionCourse = (InfoExecutionCourse) element;
                infoExecutionCourse.getAssociatedInfoExams().clear();
            }
        }
    }
View Full Code Here

Examples of org.fenixedu.academic.dto.InfoExecutionCourse

        List infoExecutionCourseList = (List) CollectionUtils.collect(executionCourseList, new Transformer() {

            @Override
            public Object transform(Object input) {
                ExecutionCourse executionCourse = (ExecutionCourse) input;
                InfoExecutionCourse infoExecutionCourse = InfoExecutionCourse.newInfoFromDomain(executionCourse);
                return infoExecutionCourse;
            }
        });

        return infoExecutionCourseList;
View Full Code Here

Examples of org.fenixedu.academic.dto.InfoExecutionCourse

                FenixRoomEvent roomEvent = null;

                if (showOccupation instanceof InfoLesson || showOccupation instanceof InfoLessonInstance) {
                    InfoShowOccupation lesson = showOccupation;
                    InfoExecutionCourse infoExecutionCourse = lesson.getInfoShift().getInfoDisciplinaExecucao();

                    String start = dataFormatHour.format(lesson.getInicio().getTime());
                    String end = dataFormatHour.format(lesson.getFim().getTime());
                    String weekday = lesson.getDiaSemana().getDiaSemanaString();

                    FenixPeriod period = new FenixPeriod(day + " " + start, day + " " + end);

                    String info = lesson.getInfoShift().getShiftTypesCodePrettyPrint();

                    FenixCourse course = new FenixCourse(infoExecutionCourse.getExecutionCourse());

                    roomEvent = new FenixRoomEvent.LessonEvent(start, end, weekday, day, period, info, course);

                } else if (showOccupation instanceof InfoWrittenEvaluation) {
                    InfoWrittenEvaluation infoWrittenEvaluation = (InfoWrittenEvaluation) showOccupation;

                    List<FenixCourse> courses = new ArrayList<>();

                    for (int iterEC = 0; iterEC < infoWrittenEvaluation.getAssociatedExecutionCourse().size(); iterEC++) {
                        InfoExecutionCourse infoEC = infoWrittenEvaluation.getAssociatedExecutionCourse().get(iterEC);
                        courses.add(new FenixCourse(infoEC.getExecutionCourse()));
                    }

                    String start = null;
                    String end = null;
                    String weekday = null;
View Full Code Here

Examples of org.fenixedu.academic.dto.InfoExecutionCourse

            List<ExecutionCourse> executionCourses) {
        List<InfoExecutionCourse> result;
        result = (List<InfoExecutionCourse>) CollectionUtils.collect(executionCourses, new Transformer() {
            @Override
            public Object transform(Object arg0) {
                InfoExecutionCourse infoExecutionCourse = null;
                infoExecutionCourse = getOccupancyLevels(arg0);
                return infoExecutionCourse;
            }

            private InfoExecutionCourse getOccupancyLevels(Object arg0) {

                InfoExecutionCourse infoExecutionCourse;
                ExecutionCourse executionCourse = (ExecutionCourse) arg0;

                Integer theoreticalCapacity = Integer.valueOf(0);
                Integer theoPraticalCapacity = Integer.valueOf(0);
                Integer praticalCapacity = Integer.valueOf(0);
                Integer labCapacity = Integer.valueOf(0);
                Integer doubtsCapacity = Integer.valueOf(0);
                Integer reserveCapacity = Integer.valueOf(0);

                Integer semCapacity = Integer.valueOf(0);
                Integer probCapacity = Integer.valueOf(0);
                Integer fieldCapacity = Integer.valueOf(0);
                Integer trainCapacity = Integer.valueOf(0);
                Integer tutCapacity = Integer.valueOf(0);

                Set<Shift> shifts = executionCourse.getAssociatedShifts();
                Iterator<Shift> iterator = shifts.iterator();

                while (iterator.hasNext()) {

                    Shift shift = iterator.next();

                    if (shift.containsType(ShiftType.TEORICA)) {
                        theoreticalCapacity = Integer.valueOf(theoreticalCapacity.intValue() + shift.getLotacao().intValue());

                    } else if (shift.containsType(ShiftType.TEORICO_PRATICA)) {
                        theoPraticalCapacity = Integer.valueOf(theoPraticalCapacity.intValue() + shift.getLotacao().intValue());

                    } else if (shift.containsType(ShiftType.DUVIDAS)) {
                        doubtsCapacity = Integer.valueOf(doubtsCapacity.intValue() + shift.getLotacao().intValue());

                    } else if (shift.containsType(ShiftType.LABORATORIAL)) {
                        labCapacity = Integer.valueOf(labCapacity.intValue() + shift.getLotacao().intValue());

                    } else if (shift.containsType(ShiftType.PRATICA)) {
                        praticalCapacity = Integer.valueOf(praticalCapacity.intValue() + shift.getLotacao().intValue());

                    } else if (shift.containsType(ShiftType.RESERVA)) {
                        reserveCapacity = Integer.valueOf(reserveCapacity.intValue() + shift.getLotacao().intValue());

                    } else if (shift.containsType(ShiftType.SEMINARY)) {
                        semCapacity = Integer.valueOf(semCapacity.intValue() + shift.getLotacao().intValue());

                    } else if (shift.containsType(ShiftType.PROBLEMS)) {
                        probCapacity = Integer.valueOf(probCapacity.intValue() + shift.getLotacao().intValue());

                    } else if (shift.containsType(ShiftType.FIELD_WORK)) {
                        fieldCapacity = Integer.valueOf(fieldCapacity.intValue() + shift.getLotacao().intValue());

                    } else if (shift.containsType(ShiftType.TRAINING_PERIOD)) {
                        trainCapacity = Integer.valueOf(trainCapacity.intValue() + shift.getLotacao().intValue());

                    } else if (shift.containsType(ShiftType.TUTORIAL_ORIENTATION)) {
                        tutCapacity = Integer.valueOf(tutCapacity.intValue() + shift.getLotacao().intValue());
                    }
                }

                infoExecutionCourse = InfoExecutionCourse.newInfoFromDomain(executionCourse);
                List<Integer> capacities = new ArrayList<Integer>();

                if (theoreticalCapacity.intValue() != 0) {
                    capacities.add(theoreticalCapacity);
                }
                if (theoPraticalCapacity.intValue() != 0) {
                    capacities.add(theoPraticalCapacity);
                }
                if (doubtsCapacity.intValue() != 0) {
                    capacities.add(doubtsCapacity);
                }
                if (labCapacity.intValue() != 0) {
                    capacities.add(labCapacity);
                }
                if (praticalCapacity.intValue() != 0) {
                    capacities.add(praticalCapacity);
                }
                if (reserveCapacity.intValue() != 0) {
                    capacities.add(reserveCapacity);
                }

                if (semCapacity.intValue() != 0) {
                    capacities.add(semCapacity);
                }
                if (probCapacity.intValue() != 0) {
                    capacities.add(probCapacity);
                }
                if (fieldCapacity.intValue() != 0) {
                    capacities.add(fieldCapacity);
                }
                if (trainCapacity.intValue() != 0) {
                    capacities.add(trainCapacity);
                }
                if (tutCapacity.intValue() != 0) {
                    capacities.add(tutCapacity);
                }

                int total = 0;

                if (!capacities.isEmpty()) {
                    total = (Collections.min(capacities)).intValue();
                }

                if (total == 0) {
                    infoExecutionCourse.setOccupancy(Double.valueOf(-1));
                } else {
                    infoExecutionCourse.setOccupancy(NumberUtils.formatNumber(
                            Double.valueOf((Double.valueOf(executionCourse.getAttendsSet().size()).floatValue() * 100 / total)),
                            1));
                }
                return infoExecutionCourse;
            }
View Full Code Here

Examples of org.fenixedu.academic.dto.InfoExecutionCourse

                            curricularYear, infoExecutionPeriod.getSemester());

            for (int i = 0; i < executionCourseList.size(); i++) {
                ExecutionCourse executionCourse = executionCourseList.get(i);

                InfoExecutionCourse infoExecutionCourse = InfoExecutionCourse.newInfoFromDomain(executionCourse);
                infoExecutionCourseList.add(infoExecutionCourse);
            }
        }

        return infoExecutionCourseList;
View Full Code Here

Examples of org.fenixedu.academic.dto.InfoExecutionCourse

        } else if (argument instanceof ExecutionCourse) {
            return (ExecutionCourse) argument;

        } else if (argument instanceof InfoExecutionCourse) {
            final InfoExecutionCourse infoExecutionCourse = (InfoExecutionCourse) argument;
            return FenixFramework.getDomainObject(infoExecutionCourse.getExternalId());

        } else if (argument instanceof String) {
            final String executionCourseID = (String) argument;
            return FenixFramework.getDomainObject(executionCourseID);
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.