Package org.fenixedu.academic.domain

Examples of org.fenixedu.academic.domain.ExecutionSemester


    }

    public ActionForward viewCurriculumLineLogStatistics(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) {

        final ExecutionSemester executionSemester = getDomainObject(request, "executionSemesterId");

        if (executionSemester != null) {
            request.setAttribute("executionSemester", executionSemester);

            final CurriculumLineLogStatisticsCalculator curriculumLineLogStatisticsCalculator =
View Full Code Here


            request.setAttribute("originExecutionDegreeName", executionDegree.getPresentationName());

        }
        RequestUtils.getAndSetStringToRequest(request, "executionCourseId");
        RequestUtils.getAndSetStringToRequest(request, "executionCourseName");
        ExecutionSemester executionSemester = FenixFramework.getDomainObject(executionPeriodId);
        request.setAttribute("executionPeriodName", executionSemester.getQualifiedName());
        return mapping.findForward("prepareAssociateCurricularCourseChooseDegreeCurricularPlan");
    }
View Full Code Here

            String originExecutionDegreeId = RequestUtils.getAndSetStringToRequest(request, "originExecutionDegreeId");
            ExecutionDegree executionDegree = FenixFramework.getDomainObject(originExecutionDegreeId);
            request.setAttribute("originExecutionDegreeName", executionDegree.getPresentationName());
        }
        String executionPeriodId = RequestUtils.getAndSetStringToRequest(request, "executionPeriodId");
        ExecutionSemester executionPeriod = FenixFramework.getDomainObject(executionPeriodId);
        request.setAttribute("executionPeriodName", executionPeriod.getQualifiedName());
        RequestUtils.getAndSetStringToRequest(request, "executionCourseName");

        //FIXME: executionPeriod might not be needed (present in exec course)
        //processing attributes
        String degreeCurricularPlanId = RequestUtils.getAndSetStringToRequest(request, "degreeCurricularPlanId");
        DegreeCurricularPlan degreeCurricularPlan = null;
        if (!StringUtils.isEmpty(degreeCurricularPlanId)) {
            degreeCurricularPlan = FenixFramework.getDomainObject(degreeCurricularPlanId);
        }
        try {
            if (degreeCurricularPlan == null) {
                throw new DomainException("error.selection.noDegree");
            }
            request.setAttribute("degreeCurricularPlanName",
                    degreeCurricularPlan.getPresentationName(executionPeriod.getExecutionYear()));
            request.setAttribute("degreeCurricularPlan", degreeCurricularPlan);
            String executionCourseId = RequestUtils.getAndSetStringToRequest(request, "executionCourseId");
            final ExecutionCourse executionCourse = FenixFramework.getDomainObject(executionCourseId);
            final ExecutionSemester executionSemester = executionCourse.getExecutionPeriod();
            final List<InfoCurricularCourse> infoCurricularCourses = new ArrayList<InfoCurricularCourse>();
            for (final DegreeModule degreeModule : rootDomainObject.getDegreeModulesSet()) {
                if (degreeModule instanceof CurricularCourse) {
                    final CurricularCourse curricularCourse = (CurricularCourse) degreeModule;
                    if (!executionCourse.getAssociatedCurricularCoursesSet().contains(curricularCourse)
View Full Code Here

    }

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

        final ExecutionSemester ces = ExecutionSemester.readActualExecutionSemester();
        final ExecutionSemester pes = ces == null ? null : ces.getPreviousExecutionPeriod();

        if (ces != null && pes != null) {
            long s = System.currentTimeMillis();
            for (final ExecutionCourse executionCourse : ces.getAssociatedExecutionCoursesSet()) {
                executionCourse.getName();
                for (final CourseLoad courseLoad : executionCourse.getCourseLoadsSet()) {
                    courseLoad.getType();
                    for (final Shift shift : courseLoad.getShiftsSet()) {
                        shift.getNome();
                        for (final SchoolClass schoolClass : shift.getAssociatedClassesSet()) {
                            schoolClass.getNome();
                            final ExecutionDegree executionDegree = schoolClass.getExecutionDegree();
                            final DegreeCurricularPlan degreeCurricularPlan = executionDegree.getDegreeCurricularPlan();
                            degreeCurricularPlan.getName();
                            final Degree degree = degreeCurricularPlan.getDegree();
                            degree.getDegreeType();
                            final RootCourseGroup root = degreeCurricularPlan.getRoot();
                            load(root);
                        }
                        for (final Lesson lesson : shift.getAssociatedLessonsSet()) {
                            lesson.getBeginHourMinuteSecond();
                            for (OccupationPeriod period = lesson.getPeriod(); period != null; period = period.getNextPeriod()) {
                                period.getStartDate();
                            }
                            for (final LessonInstance lessonInstance : lesson.getLessonInstancesSet()) {
                                lessonInstance.getBeginDateTime();
                            }
                        }
                    }
                }
            }
            long e = System.currentTimeMillis();
            logger.info("Warming up cache for enrolment period. Load of current semester information took {}ms.", e - s);

            s = System.currentTimeMillis();
//            for (final RoomClassification roomClassification : rootDomainObject.getRoomClassificationSet()) {
//                for (final RoomInformation roomInformation : roomClassification.getRoomInformationsSet()) {
//                    roomInformation.getDescription();
//                    final Room room = roomInformation.getRoom();
//                    room.getNormalCapacity();
//                }
//            }
            e = System.currentTimeMillis();
            logger.info("Warming up cache for enrolment period. Load of room listing took {}ms.", e - s);

            final Set<Student> students = new HashSet<Student>();
            s = System.currentTimeMillis();
            for (final Enrolment enrolment : pes.getEnrolmentsSet()) {
                students.add(enrolment.getStudent());
            }
            e = System.currentTimeMillis();
            logger.info("Warming up cache for enrolment period. Search for students took {}ms.", e - s);
View Full Code Here

    private static boolean isTeacher() {
        return hasRole(RoleType.TEACHER) || hasActiveProfessorship();
    }

    private static boolean hasActiveProfessorship() {
        final ExecutionSemester executionSemester = ExecutionSemester.readActualExecutionSemester();
        final Person person = AccessControl.getPerson();
        for (final Professorship professorship : person.getProfessorshipsSet()) {
            if (professorship.getExecutionCourse().getExecutionPeriod() == executionSemester) {
                return true;
            }
View Full Code Here

            chooseNotLinked = true;
        }

        String executionPeriodId = RequestUtils.getAndSetStringToRequest(request, "executionPeriodId");
        ExecutionCourse executionCourse = FenixFramework.getDomainObject(executionCourseId);
        ExecutionSemester executionPeriod = FenixFramework.getDomainObject(executionPeriodId);

        ExecutionCourseBean sessionBean = new ExecutionCourseBean();
        sessionBean.setSourceExecutionCourse(executionCourse);
        sessionBean.setExecutionSemester(executionPeriod);
        sessionBean.setChooseNotLinked(chooseNotLinked);
View Full Code Here

    public Set getSearchResult() {
        withEvaluationMethod = 0;
        withoutEvaluationMethod = 0;
        total = 0;

        final ExecutionSemester executionSemester = getExecutionPeriod();
        final List<DegreeType> degreeTypes = getDegreeTypes();
        if (executionSemester == null || degreeTypes == null) {
            return null;
        }
        final Set<ExecutionCourse> executionCourses =
                new TreeSet<ExecutionCourse>(ExecutionCourse.EXECUTION_COURSE_NAME_COMPARATOR);
        for (final ExecutionCourse executionCourse : executionSemester.getAssociatedExecutionCoursesSet()) {
            if (isLecturedIn(executionCourse, degreeTypes)) {
                total++;
                if (hasEvaluationMethod(executionCourse)) {
                    withEvaluationMethod++;
                } else {
View Full Code Here

    public void setExecutionPeriod(ExecutionSemester executionSemester) {
        this.executionPeriodDomainReference = executionSemester;
    }

    public Collection<ExecutionCourse> search(final Collection<ExecutionCourse> result) {
        final ExecutionSemester executionSemester = getExecutionPeriod();
        final ExecutionDegree executionDegree = getExecutionDegree();
        if (executionSemester == null || executionDegree == null) {
            return null;
        }
        for (final ExecutionCourse executionCourse : executionSemester.getAssociatedExecutionCoursesSet()) {
            if (matchesCriteria(executionSemester, executionDegree, executionCourse)) {
                result.add(executionCourse);
            }
        }
        return result;
View Full Code Here

                }
                for (RegistrationState state : current.getRegistrationStatesSet()) {
                    if (state.isActive()) {
                        // ensure the entries exist if there is an active state
                        // in the target years
                        ExecutionSemester first = state.getExecutionYear().getFirstExecutionPeriod();
                        ExecutionSemester second = state.getExecutionYear().getLastExecutionPeriod();
                        if (firstExecutionSemester.isBeforeOrEquals(first) && first.isBeforeOrEquals(lastExecutionSemester)) {
                            get(first);
                        }
                        if (firstExecutionSemester.isBeforeOrEquals(second) && second.isBeforeOrEquals(lastExecutionSemester)) {
                            get(second);
                        }
                    }
                }
            }
View Full Code Here

                }
            }
        }

        public void count(final Enrolment enrolment) {
            final ExecutionSemester executionSemester = enrolment.getExecutionPeriod();
            if (firstExecutionSemester.isBeforeOrEquals(executionSemester)
                    && executionSemester.isBeforeOrEquals(lastExecutionSemester)) {
                final EnrolmentAndAprovalCounter enrolmentAndAprovalCounter = get(executionSemester);
                enrolmentAndAprovalCounter.count(enrolment);
            }
        }
View Full Code Here

TOP

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

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.