Examples of StudentCurricularPlan


Examples of org.fenixedu.academic.domain.StudentCurricularPlan

        request.setAttribute("documentRequestCreateBean", requestCreateBean);
        return mapping.findForward("createDocumentRequests");
    }

    private void getAndSetSpecialEnrolments(HttpServletRequest request, DocumentRequestCreateBean requestCreateBean) {
        final StudentCurricularPlan curricularPlan = requestCreateBean.getRegistration().getLastStudentCurricularPlan();
        final DocumentRequestType requestType = requestCreateBean.getChosenDocumentRequestType();
        if (requestType.equals(DocumentRequestType.EXTRA_CURRICULAR_CERTIFICATE)) {
            List<Enrolment> enrolments = curricularPlan.getExtraCurricularApprovedEnrolmentsNotInDismissal();
            if (enrolments.size() == 0) {
                addActionMessage("warning", request, "warning.ExtraCurricularCertificateRequest.no.enrolments.available");
            }
            requestCreateBean.setEnrolments(enrolments);
        }
        if (requestType.equals(DocumentRequestType.STANDALONE_ENROLMENT_CERTIFICATE)) {
            List<Enrolment> enrolments = curricularPlan.getStandaloneApprovedEnrolmentsNotInDismissal();
            if (enrolments.size() == 0) {
                addActionMessage("warning", request, "warning.StandaloneEnrolmentCertificateRequest.no.enrolments.available");
            }
            requestCreateBean.setEnrolments(enrolments);
        }
View Full Code Here

Examples of org.fenixedu.academic.domain.StudentCurricularPlan

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

        final Enrolment enrolment = getEnrolment(request);
        final StudentCurricularPlan studentCurricularPlan = getStudentCurricularPlan(request);
        final ExecutionSemester executionSemester = getExecutionSemester(request);

        try {
            studentCurricularPlan.removeCurriculumModulesFromNoCourseGroupCurriculumGroup(
                    Collections.<CurriculumModule> singletonList(enrolment), executionSemester, getGroupType());

        } catch (final IllegalDataAccessException e) {
            addActionMessage("error", request, "error.notAuthorized");
View Full Code Here

Examples of org.fenixedu.academic.domain.StudentCurricularPlan

    protected boolean hasFutureEnrolment() {
        final Enrolment enrolment = getEnrolment();
        if (enrolment != null) {
            final ExecutionSemester executionSemester = enrolment.getExecutionPeriod();
            final CurricularCourse curricularCourse = enrolment.getCurricularCourse();
            final StudentCurricularPlan studentCurricularPlan = enrolment.getStudentCurricularPlan();
            for (final Enrolment otherEnrolment : studentCurricularPlan.getEnrolments(curricularCourse)) {
                if (otherEnrolment.getExecutionPeriod().isAfter(executionSemester)) {
                    return true;
                }
            }
        }
View Full Code Here

Examples of org.fenixedu.academic.domain.StudentCurricularPlan

    private static List<EventType> supportedEventTypes = Arrays.asList(EventType.GRATUITY,
            EventType.ADMINISTRATIVE_OFFICE_FEE_INSURANCE, EventType.ENROLMENT_OUT_OF_PERIOD);

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

        StudentCurricularPlan studentCurricularPlan = getStudentCurricularPlan(request);

        request.setAttribute("eventTypes", supportedEventTypes);
        request.setAttribute("studentCurricularPlan", studentCurricularPlan);

        /**
         * The insurance is an {@link EventType.ADMINISTRATIVE_OFFICE_FEE_INSURANCE} if the target
         * degree has no PhdProgram associated
         */
        request.setAttribute("officeFeeInsurance", studentCurricularPlan.getDegree().getPhdProgram() == null);

        return mapping.findForward("chooseEventType");

    }
View Full Code Here

Examples of org.fenixedu.academic.domain.StudentCurricularPlan

    @Override
    public ActionForward execute(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) throws Exception {

        StudentCurricularPlan studentCurricularPlan = readStudentCurricularPlan(request);
        request.setAttribute("studentCurriculumValidationAllowed",
                studentCurricularPlan.getEvaluationForCurriculumValidationAllowed());

        return super.execute(mapping, actionForm, request, response);
    }
View Full Code Here

Examples of org.fenixedu.academic.domain.StudentCurricularPlan

        return super.execute(mapping, actionForm, request, response);
    }

    public ActionForward listDocuments(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) {
        StudentCurricularPlan studentCurricularPlan = readStudentCurricularPlan(request);

        Registration registration = studentCurricularPlan.getRegistration();
        request.setAttribute("registration", registration);

        return mapping.findForward("viewDocuments");
    }
View Full Code Here

Examples of org.fenixedu.academic.domain.StudentCurricularPlan

        }
    }

    private ExecutionDegree searchForExecutionDegreeInStudent(final Registration registration,
            final ExecutionSemester executionSemester) {
        final StudentCurricularPlan studentCurricularPlan = registration.getActiveStudentCurricularPlan();
        if (studentCurricularPlan == null) {
            return null;
        }
        for (final ExecutionDegree executionDegree : studentCurricularPlan.getDegreeCurricularPlan().getExecutionDegreesSet()) {
            if (executionDegree.getExecutionYear() == executionSemester.getExecutionYear()) {
                return executionDegree;
            }
        }
        for (final DegreeCurricularPlan degreeCurricularPlan : studentCurricularPlan.getDegree().getDegreeCurricularPlansSet()) {
            for (final ExecutionDegree executionDegree : degreeCurricularPlan.getExecutionDegreesSet()) {
                if (executionDegree.getExecutionYear() == executionSemester.getExecutionYear()) {
                    return executionDegree;
                }
            }
        }
        for (final DegreeCurricularPlanEquivalencePlan equivalencePlan : studentCurricularPlan.getDegreeCurricularPlan()
                .getTargetEquivalencePlansSet()) {
            final DegreeCurricularPlan otherDegreeCurricularPlan = equivalencePlan.getDegreeCurricularPlan();
            for (final ExecutionDegree executionDegree : otherDegreeCurricularPlan.getExecutionDegreesSet()) {
                if (executionDegree.getExecutionYear() == executionSemester.getExecutionYear()) {
                    return executionDegree;
View Full Code Here

Examples of org.fenixedu.academic.domain.StudentCurricularPlan

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

        final String[] creditsIDs = ((DynaActionForm) form).getStrings("creditsToDelete");
        final StudentCurricularPlan studentCurricularPlan = getSCP(request);

        try {
            DeleteCredits.run(studentCurricularPlan, creditsIDs);
        } catch (final IllegalDataAccessException e) {
            addActionMessage(request, "error.notAuthorized");
View Full Code Here

Examples of org.fenixedu.academic.domain.StudentCurricularPlan

            if (!registration.isBolonha() || !registration.isConcluded()) {
                continue;
            }

            final StudentCurricularPlan studentCurricularPlan = registration.getLastStudentCurricularPlan();
            if (studentCurricularPlan.getDegreeType() != DegreeType.BOLONHA_MASTER_DEGREE) {

                final CycleCurriculumGroup firstCycle = studentCurricularPlan.getFirstCycle();
                if (firstCycle != null && firstCycle.isConcluded()
                        && !studentCurricularPlan.hasAnyActiveRegistrationWithFirstCycleAffinity()) {
                    result.add(registration);
                }
            }
        }
View Full Code Here

Examples of org.fenixedu.academic.domain.StudentCurricularPlan

    }

    private ActionForward getActionForwardForRegistration(ActionMapping mapping, HttpServletRequest request,
            final Registration registration) {

        final StudentCurricularPlan studentCurricularPlan = registration.getLastStudentCurricularPlan();
        final ExecutionSemester executionSemester = ExecutionSemester.readActualExecutionSemester();

        // ----------------------------------------------------------------------
        // ---------------------------------------------
        // TODO: refactor this code, should be more generic
        // ----------------------------------------------------------------------
        // ---------------------------------------------

        if (!studentCurricularPlan.isActive() && !studentCurricularPlan.getRegistration().isConcluded()) {
            request.setAttribute("registrationsToEnrol", Collections.singletonList(registration));
            addActionMessage(request, "error.studentCurricularPlan.is.not.active.or.concluded");
            return mapping.findForward("chooseRegistration");
        }

        if (studentCurricularPlan.getDegreeType() == DegreeType.BOLONHA_MASTER_DEGREE) {
            request.setAttribute("registration", registration);
            return mapping.findForward("proceedToEnrolment");

        } else {
            final CycleCurriculumGroup firstCycle = studentCurricularPlan.getFirstCycle();

            if (firstCycle == null || !firstCycle.isConcluded()) {
                request.setAttribute("registration", registration);
                return mapping.findForward("proceedToEnrolment");

            } else {
                final CycleCurriculumGroup secondCycle = studentCurricularPlan.getSecondCycle();
                if (secondCycle == null) {
                    return prepareSelectAffinityToEnrol(mapping, request, studentCurricularPlan, executionSemester);

                } else if (secondCycle.isExternal()) {
                    final Student student = studentCurricularPlan.getRegistration().getStudent();
                    final Registration newRegistration =
                            student.getActiveRegistrationFor(secondCycle.getDegreeCurricularPlanOfDegreeModule());

                    if (newRegistration != null) {
                        request.setAttribute("registration", newRegistration);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.