Examples of Lesson


Examples of org.fenixedu.academic.domain.Lesson

                builder.append(" ").append(room.getName());
            }
            return builder.toString();
        }

        Lesson lesson = getLesson();
        LessonInstance lessonInstance = lesson.getLessonInstanceFor(getDate());
        return lessonInstance != null ? lessonInstance.prettyPrint() : lesson.prettyPrint();
    }
View Full Code Here

Examples of org.fenixedu.academic.domain.Lesson

        if (isExtraLesson()) {
            return false;
        }

        Lesson lesson = getLesson();
        if (lesson.isDateValidToInsertSummary(getDate()) && lesson.isTimeValidToInsertSummary(new HourMinuteSecond(), getDate())
                && !getWrittenSummary()) {
            return true;
        }

        return false;
View Full Code Here

Examples of org.fenixedu.academic.domain.Lesson

        if (year == 0 || month == 0 || day == 0) {
            return null;
        }

        YearMonthDay date = new YearMonthDay(year, month, day);
        Lesson lesson = FenixFramework.getDomainObject(value.substring(8));
        NextPossibleSummaryLessonsAndDatesBean bean = new NextPossibleSummaryLessonsAndDatesBean(lesson, date);

        return bean;
    }
View Full Code Here

Examples of org.fenixedu.academic.domain.Lesson

                Collection<WrittenEvaluation> writtenEvaluations =
                        ((WrittenEvaluationSpaceOccupation) roomOccupation).getWrittenEvaluationsSet();
                getWrittenEvaluationRoomOccupations(infoShowOccupations, weekStartYearMonthDay, weekEndYearMonthDay,
                        writtenEvaluations);
            } else if (roomOccupation instanceof LessonSpaceOccupation) {
                final Lesson lesson = ((LessonSpaceOccupation) roomOccupation).getLesson();
                getLessonOccupations(infoShowOccupations, weekStartYearMonthDay, weekEndYearMonthDay, lesson);
            } else if (roomOccupation instanceof LessonInstanceSpaceOccupation) {
                Collection<LessonInstance> lessonInstances =
                        ((LessonInstanceSpaceOccupation) roomOccupation).getLessonInstancesSet();
                getLessonInstanceOccupations(infoShowOccupations, weekStartYearMonthDay, weekEndYearMonthDay, lessonInstances);
View Full Code Here

Examples of org.fenixedu.academic.domain.Lesson

    @Override
    public Object provide(Object source, Object currentValue) {

        SummariesManagementBean bean = (SummariesManagementBean) source;
        Lesson lesson = bean.getLesson();
        Shift shift = bean.getShift();
        SummaryType summaryType = bean.getSummaryType();
        Summary summary = bean.getSummary();
        List<YearMonthDay> possibleSummaryDates = new ArrayList<YearMonthDay>();

        if (summaryType != null && summaryType.equals(SummaryType.NORMAL_SUMMARY)) {
            if (lesson != null) {
                possibleSummaryDates.addAll(lesson.getAllPossibleDatesToInsertSummary());
            }

            // Show SummaryDate when edit summary
            if (summary != null) {
                Shift summaryShift = summary.getShift();
                Lesson summaryLesson = summary.getLesson();
                if (shift != null && lesson != null && summaryShift != null && summaryShift.equals(shift)
                        && summaryLesson != null && summaryLesson.equals(lesson)) {
                    possibleSummaryDates.add(0, summary.getSummaryDateYearMonthDay());
                }
            }
        }
        return possibleSummaryDates;
View Full Code Here

Examples of org.fenixedu.academic.domain.Lesson

                if (object == null) {
                    return new HtmlText();
                }

                Lesson lesson = (Lesson) object;
                return new HtmlText(lesson.prettyPrint());
            }
        };
    }
View Full Code Here

Examples of org.fenixedu.academic.domain.Lesson

            room =
                    infoRoomOccupation.getInfoRoom() != null ? SpaceUtils
                            .findAllocatableSpaceForEducationByName(infoRoomOccupation.getInfoRoom().getNome()) : null;
        }

        new Lesson(weekDay, begin, end, shift, frequency, executionSemester, beginDate, endDate, room);
    }
View Full Code Here

Examples of org.fenixedu.academic.domain.Lesson

    public static void run(InfoLesson aulaAntiga, DiaSemana weekDay, Calendar begin, Calendar end, FrequencyType frequency,
            InfoRoomOccupationEditor infoRoomOccupation, InfoShift infoShift, YearMonthDay newBeginDate, YearMonthDay newEndDate,
            Boolean createLessonInstances) throws FenixServiceException {
        check(RolePredicates.RESOURCE_ALLOCATION_MANAGER_PREDICATE);

        Lesson aula = FenixFramework.getDomainObject(aulaAntiga.getExternalId());

        if (aula != null) {

            Space newRoom = null;
            if (infoRoomOccupation != null && infoRoomOccupation.getInfoRoom() != null) {
                newRoom = SpaceUtils.findAllocatableSpaceForEducationByName(infoRoomOccupation.getInfoRoom().getNome());
            }

            aula.edit(newBeginDate, newEndDate, weekDay, begin, end, frequency, createLessonInstances, newRoom);
        }
    }
View Full Code Here

Examples of org.fenixedu.academic.domain.Lesson

*/
public class ReadLessonByOID {

    @Atomic
    public static InfoLesson run(String oid) {
        final Lesson lesson = FenixFramework.getDomainObject(oid);
        return (lesson != null) ? InfoLesson.newInfoFromDomain(lesson) : null;

    }
View Full Code Here

Examples of org.fenixedu.academic.domain.Lesson

    }

    @Atomic
    public static void run(final SortedSet<NextPossibleSummaryLessonsAndDatesBean> set) {
        final NextPossibleSummaryLessonsAndDatesBean last = set.last();
        final Lesson lesson = last.getLesson();
        final YearMonthDay date = last.getDate();
        lesson.refreshPeriodAndInstancesInSummaryCreation(lesson.isBiWeeklyOffset() ? date.plusDays(8) : date.plusDays(1));
        for (final NextPossibleSummaryLessonsAndDatesBean n : set) {
            run(n.getLesson(), n.getDate());
        }
    }
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.