Package org.fenixedu.academic.domain

Examples of org.fenixedu.academic.domain.ExecutionCourse$CurricularCourseExecutionCourseListener


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

        Professorship loggedProfessorship = (Professorship) request.getAttribute("loggedTeacherProfessorship");
        ExecutionCourse executionCourse = (ExecutionCourse) request.getAttribute("executionCourse");
        DynaActionForm dynaActionForm = (DynaActionForm) form;
        String[] selectedLessons = request.getParameterValues("selectedLessonAndDate");

        if (selectedLessons == null || selectedLessons.length == 0) {
            return goToInsertComplexSummaryAgain(request, mapping, response, form);
View Full Code Here


    }

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

        ExecutionCourse executionCourse = getExecutinCourseFromParameter(request);
        SummariesCalendarBean summariesCalendarBean = new SummariesCalendarBean(executionCourse);
        Set<NextPossibleSummaryLessonsAndDatesBean> summariesCalendar =
                new TreeSet<NextPossibleSummaryLessonsAndDatesBean>(
                        NextPossibleSummaryLessonsAndDatesBean.COMPARATOR_BY_DATE_AND_HOUR);
        Set<Shift> associatedShifts = executionCourse.getAssociatedShifts();

        for (Shift shift : associatedShifts) {
            for (Lesson lesson : shift.getAssociatedLessonsSet()) {
                for (YearMonthDay lessonDate : lesson.getAllLessonDates()) {
                    summariesCalendar.add(new NextPossibleSummaryLessonsAndDatesBean(lesson, lessonDate));
View Full Code Here

            HttpServletResponse response) {

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

        ExecutionCourse executionCourse = bean.getExecutionCourse();
        Shift shift = bean.getShift();
        ShiftType shiftType = bean.getShiftType();
        LessonCalendarViewType calendarViewType = bean.getCalendarViewType();

        Set<NextPossibleSummaryLessonsAndDatesBean> summariesCalendar =
                new TreeSet<NextPossibleSummaryLessonsAndDatesBean>(
                        NextPossibleSummaryLessonsAndDatesBean.COMPARATOR_BY_DATE_AND_HOUR);

        for (Lesson lesson : executionCourse.getLessons()) {

            boolean insert = true;
            if ((shift != null && !shift.getAssociatedLessonsSet().contains(lesson))
                    || (shiftType != null && !lesson.getShift().containsType(shiftType))) {
                insert = false;
            }

            if (insert) {
                for (YearMonthDay lessonDate : lesson.getAllLessonDates()) {
                    if ((calendarViewType.equals(LessonCalendarViewType.ALL_LESSONS))
                            || (calendarViewType.equals(LessonCalendarViewType.PAST_LESSON) && lesson.isTimeValidToInsertSummary(
                                    new HourMinuteSecond(), lessonDate))
                            || (calendarViewType.equals(LessonCalendarViewType.PAST_LESSON_WITHOUT_SUMMARY) && lesson
                                    .getSummaryByDate(lessonDate) == null)
                            && lesson.isTimeValidToInsertSummary(new HourMinuteSecond(), lessonDate)) {

                        summariesCalendar.add(new NextPossibleSummaryLessonsAndDatesBean(lesson, lessonDate));
                    }
                }
            }
        }

        // Extra Summaries
        if (shift != null) {
            if (shiftType == null) {
                addExtraSummariesToSummariesCalendar(summariesCalendar, shift, calendarViewType);
            }
        } else {
            for (Shift executionCourseShift : executionCourse.getAssociatedShifts()) {
                if (shiftType == null) {
                    addExtraSummariesToSummariesCalendar(summariesCalendar, executionCourseShift, calendarViewType);
                }
            }
        }
View Full Code Here

    }

    private void buildSummariesManagementBean(ActionForm form, HttpServletRequest request, SummaryType summaryType) {
        DynaActionForm dynaActionForm = (DynaActionForm) form;
        Professorship loggedProfessorship = (Professorship) request.getAttribute("loggedTeacherProfessorship");
        ExecutionCourse executionCourse = (ExecutionCourse) request.getAttribute("executionCourse");
        dynaActionForm.set("teacher", loggedProfessorship.getExternalId().toString());
        request.setAttribute("summariesManagementBean", new SummariesManagementBean(summaryType, executionCourse,
                loggedProfessorship, null));
    }
View Full Code Here

                    (bean.getTeacher() != null) ? String.valueOf(bean.getTeacher().getPerson().getUsername()) : "");
        }
    }

    private ExecutionCourse readAndSaveExecutionCourse(HttpServletRequest request) {
        ExecutionCourse executionCourse = getExecutinCourseFromParameter(request);
        request.setAttribute("executionCourse", executionCourse);
        return executionCourse;
    }
View Full Code Here

    public ActionForward sendCommentThroughEmail(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) throws FenixServiceException {

        final Project project = getProject(request);

        ExecutionCourse course = (ExecutionCourse) FenixFramework.getDomainObject(getExecutionCourseID(request));

        NotifyStudentGroup.run(project.getLastProjectSubmissionForStudentGroup(getStudentGroup(request)), course,
                getLoggedPerson(request));

        return prepareGroupComment(mapping, form, request, response);
View Full Code Here

    }

    public ActionForward prepare(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) {
        // Integer objectCode =
        // Integer.valueOf(request.getParameter("objectCode"));
        ExecutionCourse executionCourse = getExecutionCourse(request);
        // ExecutionCourse executionCourse =
        // FenixFramework.getDomainObject(objectCode);
        SearchExecutionCourseAttendsBean searchExecutionCourseAttendsBean = readSearchBean(request, executionCourse);

        executionCourse.searchAttends(searchExecutionCourseAttendsBean);
        request.setAttribute("searchBean", searchExecutionCourseAttendsBean);
        request.setAttribute("executionCourse", searchExecutionCourseAttendsBean.getExecutionCourse());

        prepareAttendsCollectionPages(request, searchExecutionCourseAttendsBean, executionCourse);
View Full Code Here

        request.setAttribute("attendsPagesBean", attendsPagesBean);
    }

    public ActionForward sendEmail(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) {
        ExecutionCourse executionCourse;
        Group studentsGroup = null;
        String label;
        Sender sender;
        SearchExecutionCourseAttendsBean bean = getRenderedObject("mailViewState");
        if (bean != null) {
View Full Code Here

        return doForward(request, "/teacher/evaluation/gradeSubmission/gradeSubmissionStepTwo.jsp");
    }

    public ActionForward prepareSubmitMarks(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) {
        final ExecutionCourse executionCourse = (ExecutionCourse) request.getAttribute("executionCourse");
        if (!executionCourse.getAvailableGradeSubmission()) {
            addActionMessage(request, "error.teacher.gradeSubmission.gradeSubmission.not.available");
            return mapping.findForward("mainPage");
        }

        MarkSheetTeacherGradeSubmissionBean submissionBean = new MarkSheetTeacherGradeSubmissionBean();
View Full Code Here

        }
    }

    public ActionForward viewSubmitedMarkSheets(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) {
        final ExecutionCourse executionCourse = (ExecutionCourse) request.getAttribute("executionCourse");
        Collection<MarkSheet> associatedMarkSheets = executionCourse.getAssociatedMarkSheets();

        request.setAttribute("markSheets", associatedMarkSheets);
        request.setAttribute("executionCourseID", executionCourse.getExternalId());
        return doForward(request, "/teacher/evaluation/gradeSubmission/viewSubmitedMarkSheets.jsp");
    }
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.domain.ExecutionCourse$CurricularCourseExecutionCourseListener

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.