Examples of Shift


Examples of org.fenixedu.academic.domain.Shift

                    row.setCell(executionCourse.getName());
                    final LessonInstance lessonInstance = summary.getLessonInstance();
                    final CourseLoad courseLoad = lessonInstance == null ? null : lessonInstance.getCourseLoad();
                    final ShiftType shiftType = courseLoad == null ? null : courseLoad.getType();
                    row.setCell(shiftType == null ? "" : shiftType.getName());
                    final Shift shift = summary.getShift();
                    row.setCell(shift == null ? "" : shift.getNome());
                    row.setCell(getTeacherId(summary));
                    row.setCell(getTeacherName(summary));
                    row.setCell(getSchedule(summary));
                    final Space room = summary.getRoom();
                    row.setCell(room == null ? "" : room.getName());
View Full Code Here

Examples of org.fenixedu.academic.domain.Shift

        }
        return name + " [" + curricularCourse.getDegree().getSigla() + "]";
    }

    private String shiftToString(String id) {
        Shift shift = FenixFramework.getDomainObject(id);
        return shift.getPresentationName();
    }
View Full Code Here

Examples of org.fenixedu.academic.domain.Shift

        } else {
            summaries = new TreeSet<Summary>(Summary.COMPARATOR_BY_DATE_AND_HOUR);
        }

        for (final Summary summary : getExecutionCourse().getAssociatedSummariesSet()) {
            final Shift shift = summary.getShift();
            if (getShift() == null || getShift() == shift) {
                if (getShiftType() == null || getShiftType() == summary.getSummaryType()) {
                    final Professorship professorship = summary.getProfessorship();
                    if (getProfessorship() == null && showOtherProfessors == null) {
                        summaries.add(summary);
View Full Code Here

Examples of org.fenixedu.academic.domain.Shift

        final IViewState viewState = RenderUtils.getViewState();
        ImportLessonPlanningsBean bean = (ImportLessonPlanningsBean) viewState.getMetaObject().getObject();

        ExecutionCourse executionCourseTo = bean.getExecutionCourseTo();
        Shift shiftFrom = bean.getShift();

        try {
            ImportLessonPlannings.runImportLessonPlannings(executionCourseTo.getExternalId(), executionCourseTo,
                    shiftFrom.getExecutionCourse(), shiftFrom);
        } catch (DomainException e) {
            addActionMessage(request, e.getKey(), e.getArgs());
        }

        request.setAttribute("importLessonPlanningBean", bean);
View Full Code Here

Examples of org.fenixedu.academic.domain.Shift

        if (request.getParameter("showPhotos") == null) {
            request.setAttribute("showPhotos", "false");
        }

        Shift shift = FenixFramework.getDomainObject(shiftID);
        ExecutionCourse executionCourse = FenixFramework.getDomainObject(executionCourseID);

        if (registrationID != null) {
            Registration registration = FenixFramework.getDomainObject(registrationID);
            shift.removeAttendFromShift(registration, executionCourse);
            request.setAttribute("registration", registration);
        }

        List<Registration> registrations = new ArrayList<Registration>();
        registrations.addAll(shift.getStudentsSet());
        Collections.sort(registrations, Registration.NUMBER_COMPARATOR);

        request.setAttribute("registrations", registrations);
        request.setAttribute("shift", shift);
        request.setAttribute("executionCourseID", executionCourseID);
View Full Code Here

Examples of org.fenixedu.academic.domain.Shift

        String shiftID = request.getParameter("shiftID");
        String registrationID = request.getParameter("registrationID");
        String executionCourseID = request.getParameter("executionCourseID");
        String removeAll = request.getParameter("removeAll");

        Shift shift = FenixFramework.getDomainObject(shiftID);

        if (removeAll != null) {
            request.setAttribute("removeAll", removeAll);
        } else {
            Registration registration = FenixFramework.getDomainObject(registrationID);
View Full Code Here

Examples of org.fenixedu.academic.domain.Shift

            HttpServletResponse response) {

        String executionCourseID = request.getParameter("executionCourseID");
        String shiftID = request.getParameter("shiftID");

        Shift shift = FenixFramework.getDomainObject(shiftID);
        ExecutionCourse executionCourse = FenixFramework.getDomainObject(executionCourseID);

        for (Registration registration : shift.getStudentsSet()) {
            shift.removeAttendFromShift(registration, executionCourse);
        }

        request.setAttribute("shift", shift);
        request.setAttribute("executionCourseID", executionCourseID);
        request.setAttribute("registrations", shift.getStudentsSet());
        request.setAttribute("personBean", new PersonBean());

        return forward(request, "/teacher/executionCourse/editShift.jsp");
    }
View Full Code Here

Examples of org.fenixedu.academic.domain.Shift

            HttpServletResponse response) throws Exception {

        DynaActionForm manageLessonForm = (DynaActionForm) form;

        InfoShift infoShift = (InfoShift) request.getAttribute(PresentationConstants.SHIFT);
        Shift shift = FenixFramework.getDomainObject(infoShift.getExternalId());
        GenericPair<YearMonthDay, YearMonthDay> maxLessonsPeriod = shift.getExecutionCourse().getMaxLessonsPeriod();

        if (maxLessonsPeriod != null) {
            request.setAttribute("executionDegreeLessonsStartDate", maxLessonsPeriod.getLeft().toString("dd/MM/yyyy"));
            request.setAttribute("executionDegreeLessonsEndDate", maxLessonsPeriod.getRight().toString("dd/MM/yyyy"));
            manageLessonForm.set("newBeginDate", maxLessonsPeriod.getLeft().toString("dd/MM/yyyy"));
View Full Code Here

Examples of org.fenixedu.academic.domain.Shift

            InfoLesson infoLesson = (InfoLesson) request.getAttribute(PresentationConstants.LESSON);
            InfoShift infoShift = (InfoShift) request.getAttribute(PresentationConstants.SHIFT);

            String action = request.getParameter("action");

            final Shift shift;
            if (action != null && action.equals("edit")) {
                final Lesson lesson = FenixFramework.getDomainObject(infoLesson.getExternalId());
                shift = lesson.getShift();
            } else {
                shift = FenixFramework.getDomainObject(infoShift.getExternalId());
            }
            final GenericPair<YearMonthDay, YearMonthDay> maxLessonsPeriod = shift.getExecutionCourse().getMaxLessonsPeriod();

            YearMonthDay lessonNewBeginDate = getDateFromForm(manageLessonForm, "newBeginDate");
            YearMonthDay lessonEndDate = getDateFromForm(manageLessonForm, "newEndDate");

            List<InfoRoom> emptyRoomsList = null;
View Full Code Here

Examples of org.fenixedu.academic.domain.Shift

    }

    private List<Shift> readShiftsToEnrolFrom(SchoolClass schoolClass, List<String> shiftNames, List<String> errorLog) {
        final List<Shift> result = new ArrayList<Shift>();
        for (final String shiftName : shiftNames) {
            Shift shift = readShiftFrom(schoolClass, shiftName);
            if (shift == null) {
                errorLog.add(new StringBuilder("Não existe nenhum turno: '").append(shiftName).append("' associado à aula: '")
                        .append(schoolClass.getNome()).append("'.").toString());
                shift = readShiftByName(shiftName);
                if (shift == null) {
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.