Package org.fenixedu.academic.domain

Examples of org.fenixedu.academic.domain.ExecutionSemester


    }

    public ActionForward downloadRoomLessonOccupationInfo(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) throws IOException {
        final ExecutionSemester executionSemester = getExecutionSemester(request);

        final ExecutionYear executionYear = executionSemester.getExecutionYear();

        response.setContentType("application/vnd.ms-excel");
        response.setHeader("Content-disposition", "attachment; filename=occupationMap"
                + executionYear.getYear().replace('/', '_') + "_" + executionSemester.getSemester() + ".xls");

        final RoomMap occupationMap = new RoomMap();

        Space.getSpaces().forEach(s -> occupationMap.register(s));

        for (final ExecutionCourse executionCourse : executionSemester.getAssociatedExecutionCoursesSet()) {
            for (final CourseLoad courseLoad : executionCourse.getCourseLoadsSet()) {
                for (final Shift shift : courseLoad.getShiftsSet()) {
                    for (final Lesson lesson : shift.getAssociatedLessonsSet()) {
                        occupationMap.register(lesson);
                    }
View Full Code Here


    public ActionForward choosePrinterMarkSheetsWebPostBack(ActionMapping mapping, ActionForm actionForm,
            HttpServletRequest request, HttpServletResponse response) {
        final DynaActionForm form = (DynaActionForm) actionForm;

        final ExecutionSemester executionSemester = getExecutionSemester(form);
        final DegreeCurricularPlan degreeCurricularPlan = getDegreeCurricularPlan(form);

        return choosePrinterMarkSheetsWeb(mapping, actionForm, request, response, executionSemester, degreeCurricularPlan);
    }
View Full Code Here

    private void fillMarkSheetRectifyBean(ActionForm actionForm, HttpServletRequest request, MarkSheetRectifyBean markSheetBean) {
        DynaActionForm form = (DynaActionForm) actionForm;

        String markSheetType = form.getString("mst");

        final ExecutionSemester executionSemester = getDomainObject(form, "epID");
        final CurricularCourse curricularCourse = getDomainObject(form, "ccID");

        markSheetBean.setExecutionPeriod(executionSemester);
        markSheetBean.setDegree(this.<Degree> getDomainObject(form, "dID"));
        markSheetBean.setDegreeCurricularPlan(this.<DegreeCurricularPlan> getDomainObject(form, "dcpID"));
View Full Code Here

    }

    protected void fillMarkSheetBean(ActionForm actionForm, HttpServletRequest request, MarkSheetManagementBaseBean markSheetBean) {
        DynaActionForm form = (DynaActionForm) actionForm;

        final ExecutionSemester executionSemester = getDomainObject(form, "epID");
        final CurricularCourse curricularCourse = getDomainObject(form, "ccID");

        markSheetBean.setExecutionPeriod(executionSemester);
        markSheetBean.setDegree(this.<Degree> getDomainObject(form, "dID"));
        markSheetBean.setDegreeCurricularPlan(this.<DegreeCurricularPlan> getDomainObject(form, "dcpID"));
View Full Code Here

        if (registration != null) {
            final SortedMap<ExecutionSemester, SortedSet<Attends>> attendsMap =
                    new TreeMap<ExecutionSemester, SortedSet<Attends>>();
            for (final Attends attends : registration.getAssociatedAttendsSet()) {
                final ExecutionSemester executionSemester = attends.getExecutionPeriod();
                SortedSet<Attends> attendsSet = attendsMap.get(executionSemester);
                if (attendsSet == null) {
                    attendsSet = new TreeSet<Attends>(Attends.ATTENDS_COMPARATOR);
                    attendsMap.put(executionSemester, attendsSet);
                }
View Full Code Here

        request.setAttribute("registration", registration);

        AddAttendsBean addAttendsBean = (AddAttendsBean) getObjectFromViewState("addAttendsBean");
        if (addAttendsBean == null) {
            addAttendsBean = new AddAttendsBean();
            final ExecutionSemester executionPeriod = ExecutionSemester.readActualExecutionSemester();
            final ExecutionYear executionYear = executionPeriod.getExecutionYear();
            final Degree degree = registration.getDegree();
            final ExecutionDegree executionDegree = getExecutionDegree(executionYear, degree);

            addAttendsBean.setExecutionPeriod(executionPeriod);
            addAttendsBean.setExecutionYear(executionYear);
View Full Code Here

        request.setAttribute("executionPeriods", sortedExecutionPeriods);

        final DynaActionForm dynaActionForm = (DynaActionForm) form;

        final String executionPeriodID = getExecutionPeriodID(dynaActionForm);
        final ExecutionSemester selectedExecutionPeriod = findExecutionPeriod(executionSemesters, executionPeriodID);
        dynaActionForm.set("executionPeriodID", selectedExecutionPeriod.getExternalId().toString());

        final Collection<ExecutionDegree> executionDegrees = new ArrayList<ExecutionDegree>();
        for (final ExecutionDegree executionDegree : selectedExecutionPeriod.getExecutionYear()
                .getExecutionDegreesSortedByDegreeName()) {
            if (executionDegree.getDegreeCurricularPlan().getDegree().getDegreeType() == DegreeType.DEGREE) {
                executionDegrees.add(executionDegree);
            }
        }
View Full Code Here

        setCreatedBy(getCurrentUser());
        setUsedInSeparationCycle(false);
    }

    final public ExecutionYear getExecutionYear() {
        final ExecutionSemester executionSemester = getExecutionPeriod();
        return executionSemester == null ? null : executionSemester.getExecutionYear();
    }
View Full Code Here

        return Collections.singleton(this);
    }

    @Override
    public MultiLanguageString getName() {
        ExecutionSemester period = getExecutionPeriod();
        CurricularCourse course = getCurricularCourse();
        return new MultiLanguageString().with(MultiLanguageString.pt, course.getName(period)).with(MultiLanguageString.en,
                course.getNameEn(period));
    }
View Full Code Here

    private Collection<ExecutionCourse> getExecutionCoursesActiveIn(LocalDate day) {
        DateTime date = day.toDateTimeAtStartOfDay();
        Set<ExecutionCourse> courses = new HashSet<>();
        for (ExecutionInterval interval : Bennu.getInstance().getExecutionIntervalsSet()) {
            if (interval instanceof ExecutionSemester && interval.getAcademicInterval().contains(date)) {
                ExecutionSemester semester = (ExecutionSemester) interval;
                courses.addAll(semester.getAssociatedExecutionCoursesSet());
            }
        }
        return courses;
    }
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.