Package org.fenixedu.academic.domain

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


    @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

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

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

            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

    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

*/
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

    }

    @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

        check(RolePredicates.RESOURCE_ALLOCATION_MANAGER_PREDICATE);
        final List<DomainException> exceptionList = new ArrayList<DomainException>();

        for (final String lessonOID : lessonOIDs) {
            try {
                Lesson lesson = FenixFramework.getDomainObject(lessonOID);
                if (lesson != null) {
                    lesson.delete();
                }
            } catch (DomainException e) {
                exceptionList.add(e);
            }
        }
View Full Code Here

    }

    @Override
    public boolean isOccupiedByExecutionCourse(final ExecutionCourse executionCourse, final DateTime start, final DateTime end) {
        for (final LessonInstance lessonInstance : getLessonInstancesSet()) {
            final Lesson lesson = lessonInstance.getLesson();
            if (lesson.getExecutionCourse() == executionCourse && start.isBefore(lessonInstance.getEndDateTime())
                    && end.isAfter(lessonInstance.getBeginDateTime())) {
                return true;
            }
        }
        return false;
View Full Code Here

    public String getUrl() {
        LessonInstance lis = getLessonInstancesSet().iterator().next();
        if (lis == null) {
            return "";
        }
        Lesson li = lis.getLesson();

        return li.getShift().getExecutionCourse().getSiteUrl();
    }
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.domain.Lesson

Copyright © 2018 www.massapicom. 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.