Package org.fenixedu.academic.dto.degreeAdministrativeOffice.gradeSubmission

Examples of org.fenixedu.academic.dto.degreeAdministrativeOffice.gradeSubmission.MarkSheetManagementEditBean


public class MarkSheetEditDispatchAction extends MarkSheetDispatchAction {

    public ActionForward prepareEditMarkSheet(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) {

        MarkSheetManagementEditBean editBean = new MarkSheetManagementEditBean();
        fillMarkSheetBean(actionForm, request, editBean);

        DynaActionForm form = (DynaActionForm) actionForm;
        MarkSheet markSheet = getDomainObject(form, "msID");

        editBean.setTeacherId(markSheet.getResponsibleTeacher().getPerson().getUsername());
        editBean.setEvaluationDate(markSheet.getEvaluationDateDateTime().toDate());
        editBean.setMarkSheet(markSheet);
        editBean.setEnrolmentEvaluationBeansToEdit(getEnrolmentEvaluationBeansToEdit(markSheet));
        if (markSheet.getMarkSheetState() == MarkSheetState.NOT_CONFIRMED) {
            editBean.setEnrolmentEvaluationBeansToAppend(getEnrolmentEvaluationBeansToAppend(markSheet));
        }
        return mapping.findForward("editMarkSheet");
    }
View Full Code Here


    }

    public ActionForward updateMarkSheet(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) throws FenixServiceException {

        MarkSheetManagementEditBean editBean = getMarkSheetManagementEditBean();
        request.setAttribute("edit", editBean);

        ActionMessages actionMessages = createActionMessages();

        checkIfTeacherIsResponsibleOrCoordinator(editBean.getCurricularCourse(), editBean.getExecutionPeriod(),
                editBean.getTeacherId(), editBean.getTeacher(), request, editBean.getMarkSheet().getMarkSheetType(),
                actionMessages);

        checkIfEvaluationDateIsInExamsPeriod(editBean.getDegreeCurricularPlan(), editBean.getExecutionPeriod(),
                editBean.getEvaluationDate(), editBean.getMarkSheet().getMarkSheetType(), request, actionMessages);

        if (actionMessages.isEmpty()) {
            try {
                EditMarkSheet.run(editBean.getMarkSheet(), editBean.getTeacher(), editBean.getEvaluationDate());

                editBean.setEnrolmentEvaluationBeansToEdit(getEnrolmentEvaluationBeansToEdit(editBean.getMarkSheet()));
                RenderUtils.invalidateViewState("edit-marksheet-enrolments");

                editBean.setEnrolmentEvaluationBeansToAppend(getEnrolmentEvaluationBeansToAppend(editBean.getMarkSheet()));
                RenderUtils.invalidateViewState("append-enrolments");

            } catch (InvalidArgumentsServiceException e) {
                addMessage(request, actionMessages, e.getMessage());
            } catch (DomainException e) {
View Full Code Here

    }

    public ActionForward editMarkSheet(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) throws FenixServiceException {

        MarkSheetManagementEditBean editBean = getMarkSheetManagementEditBean();

        ActionMessages actionMessages = createActionMessages();
        try {
            EditMarkSheet.run(editBean);
            return mapping.findForward("searchMarkSheetFilled");
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.dto.degreeAdministrativeOffice.gradeSubmission.MarkSheetManagementEditBean

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.