Examples of ExecutionDegree


Examples of org.fenixedu.academic.domain.ExecutionDegree

        if (executionDegrees.isEmpty()) {
            addActionMessage(request, "errors.impossible.operation");
            return mapping.getInputForward();
        }

        final ExecutionDegree selectedExecutionDegree =
                getSelectedExecutionDegree(form, registration, executionSemester, executionDegrees);
        if (selectedExecutionDegree == null) {
            addActionMessage(request, "errors.impossible.operation");
            return mapping.getInputForward();
        }

        request.setAttribute("selectedExecutionDegree", selectedExecutionDegree);
        form.set("degree", selectedExecutionDegree.getExternalId());

        sortExecutionDegreesByDegreeName(executionDegrees);
        request.setAttribute(
                "executionDegrees",
                ExecutionDegreesFormat.buildLabelValueBeansForExecutionDegree(executionDegrees,
                        getResources(request, "ENUMERATION_RESOURCES"), request));

        request.setAttribute("attendingExecutionCourses", registration.getAttendingExecutionCoursesFor(executionSemester));
        request.setAttribute("executionCoursesFromExecutionDegree", selectedExecutionDegree.getDegreeCurricularPlan()
                .getExecutionCoursesByExecutionPeriod(executionSemester));

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

Examples of org.fenixedu.academic.domain.ExecutionDegree

    private ExecutionDegree getSelectedExecutionDegree(final DynaActionForm form, final Registration registration,
            final ExecutionSemester executionSemester, final List<ExecutionDegree> executionDegrees) {

        final String executionDegreeIdChosen = (String) form.get("degree");
        final ExecutionDegree executionDegreeChosen =
                (!StringUtils.isEmpty(executionDegreeIdChosen) ? (ExecutionDegree) FenixFramework
                        .getDomainObject(executionDegreeIdChosen) : null);
        if (executionDegreeChosen != null && executionDegreeChosen.getExecutionYear() == executionSemester.getExecutionYear()) {
            return executionDegreeChosen;
        } else {
            return searchForExecutionDegreeInStudent(registration, executionSemester);
        }
    }
View Full Code Here

Examples of org.fenixedu.academic.domain.ExecutionDegree

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

        ExecutionDegreeBean executionDegreeBean = (ExecutionDegreeBean) RenderUtils.getViewState().getMetaObject().getObject();

        ExecutionDegree executionDegree = null;
        if (executionDegreeBean.getDegreeCurricularPlan() != null) {
            executionDegree =
                    executionDegreeBean.getDegreeCurricularPlan()
                            .getExecutionDegreeByYear(executionDegreeBean.getExecutionYear());
        }
View Full Code Here

Examples of org.fenixedu.academic.domain.ExecutionDegree

            HttpServletResponse response) throws Exception {
        DegreeCoordinatorIndex.setCoordinatorContext(request);

        request.setAttribute("degreeCurricularPlan", getDegreeCurricularPlan(request));

        ExecutionDegree executionDegree = getExecutionDegree(request);
        if (executionDegree != null) {
            request.setAttribute("executionDegree", executionDegree);
            request.setAttribute("executionDegreeId", executionDegree.getExternalId());
        } else {
            request.setAttribute("executionDegreeId", "");
        }

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

Examples of org.fenixedu.academic.domain.ExecutionDegree

    }

    public ActionForward manage(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) throws Exception {
        DegreeCurricularPlan degreeCurricularPlan = getDegreeCurricularPlan(request);
        ExecutionDegree executionDegree = getExecutionDegree(request);

        ExecutionDegreeBean bean = getRenderedObject("executionDegreeChoice");
        if (bean == null) {
            bean = new ExecutionDegreeBean(degreeCurricularPlan);
            bean.setExecutionDegree(executionDegree);
        }

        request.setAttribute("executionDegree", executionDegree);
        request.setAttribute("executionDegreeBean", bean);
        request.setAttribute("usernameBean", new VariantBean());
        request.setAttribute("members", executionDegree == null ? null : executionDegree.getScientificCommissionMembersSet());

        if (isResponsible(request, executionDegree)) {
            request.setAttribute("responsible", true);
        }
View Full Code Here

Examples of org.fenixedu.academic.domain.ExecutionDegree

            Person person = Person.readPersonByUsername(username);
            if (person == null) {
                addActionMessage("addError", request, "error.coordinator.scientificComission.person.doesNotExist");
            } else {
                ExecutionDegree executionDegree = getExecutionDegree(request);

                try {
                    AddScientificCommission.runAddScientificCommission(executionDegree.getExternalId(), person);
                    RenderUtils.invalidateViewState("usernameChoice");
                } catch (DomainException e) {
                    addActionMessage("addError", request, e.getKey(), e.getArgs());
                }
            }
View Full Code Here

Examples of org.fenixedu.academic.domain.ExecutionDegree

    public ActionForward removeMember(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) throws Exception {
        String memberId = request.getParameter("memberID");

        if (memberId != null) {
            ExecutionDegree executionDegree = getExecutionDegree(request);

            for (ScientificCommission commission : executionDegree.getScientificCommissionMembersSet()) {
                if (commission.getExternalId().equals(memberId)) {
                    try {
                        DeleteScientificCommission.runDeleteScientificCommission(executionDegree.getExternalId(), commission);
                    } catch (DomainException e) {
                        addActionMessage("addError", request, e.getKey(), e.getArgs());
                    }
                }
            }
View Full Code Here

Examples of org.fenixedu.academic.domain.ExecutionDegree

        final DegreeCurricularPlan degreeCurricularPlan = enrolment.getDegreeCurricularPlanOfStudent();
        final Person person = AccessControl.getPerson();

        if (person != null) {
            for (final ScientificCommission scientificCommission : person.getScientificCommissionsSet()) {
                final ExecutionDegree executionDegree = scientificCommission.getExecutionDegree();
                if (executionDegree.getExecutionYear() == executionYear
                        && executionDegree.getDegreeCurricularPlan() == degreeCurricularPlan) {
                    return;
                }
            }
        }
        throw new DomainException("degree.scientificCommission.notMember");
View Full Code Here

Examples of org.fenixedu.academic.domain.ExecutionDegree

        return degreeCurricularPlan.getExecutionDegreeByYear(executionYear);
    }

    @Override
    public void setEnrolment(Enrolment enrolment) {
        final ExecutionDegree executionDegree = getExecutionDegree(enrolment);
        final YearMonthDay beginThesisCreationPeriod = executionDegree.getBeginThesisCreationPeriod();
        final YearMonthDay endThesisCreationPeriod = executionDegree.getEndThesisCreationPeriod();

        final YearMonthDay today = new YearMonthDay();
        if (beginThesisCreationPeriod == null || beginThesisCreationPeriod.isAfter(today)) {
            throw new DomainException("thesis.creation.not.allowed.because.out.of.period");
        }
View Full Code Here

Examples of org.fenixedu.academic.domain.ExecutionDegree

        private YearMonthDay endThesisCreationPeriod;

        @Override
        public Object execute() {
            final ExecutionDegree executionDegree = getExecutionDegree();
            if (executionDegree == null) {
                final ExecutionYear executionYear = getExecutionYear();
                if (executionYear != null) {
                    for (final ExecutionDegree otherExecutionDegree : executionYear.getExecutionDegreesSet()) {
                        execute(otherExecutionDegree);
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.