Examples of BolonhaStudentOptionalEnrollmentBean


Examples of org.fenixedu.academic.dto.student.enrollment.bolonha.BolonhaStudentOptionalEnrollmentBean

        final BolonhaStudentEnrollmentBean bean = getBolonhaStudentEnrollmentBeanFromViewState();
        if (bean != null && bean.getRegistration() != null) {
            return bean.getRegistration();
        }

        final BolonhaStudentOptionalEnrollmentBean optionalBean = getBolonhaStudentOptionalEnrollmentBeanFromViewState();
        if (optionalBean != null && optionalBean.getRegistration() != null) {
            return optionalBean.getRegistration();
        }

        return null;
    }
View Full Code Here

Examples of org.fenixedu.academic.dto.student.enrollment.bolonha.BolonhaStudentOptionalEnrollmentBean

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

        final BolonhaStudentOptionalEnrollmentBean bean = getBolonhaStudentOptionalEnrollmentBeanFromViewState();
        addCompetenceCoursesAvalailableToEnrol(request, bean.getStudentCurricularPlan());
        return super.updateParametersToSearchOptionalCurricularCourses(mapping, actionForm, request, response);
    }
View Full Code Here

Examples of org.fenixedu.academic.dto.student.enrollment.bolonha.BolonhaStudentOptionalEnrollmentBean

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

        final BolonhaStudentOptionalEnrollmentBean bean = getBolonhaStudentOptionalEnrollmentBeanFromViewState();
        addCompetenceCoursesAvalailableToEnrol(request, bean.getStudentCurricularPlan());
        return super.enrolInOptionalCurricularCourse(mapping, form, request, response);
    }
View Full Code Here

Examples of org.fenixedu.academic.dto.student.enrollment.bolonha.BolonhaStudentOptionalEnrollmentBean

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

        final BolonhaStudentEnrollmentBean bean = getBolonhaStudentEnrollmentBeanFromViewState();
        request.setAttribute("optionalEnrolmentBean", new BolonhaStudentOptionalEnrollmentBean(bean.getStudentCurricularPlan(),
                bean.getExecutionPeriod(), bean.getOptionalDegreeModuleToEnrol()));

        request.setAttribute("curricularRuleLabels", getLabels(bean.getOptionalDegreeModuleToEnrol().getDegreeModule()
                .getCurricularRules(bean.getExecutionPeriod())));
View Full Code Here

Examples of org.fenixedu.academic.dto.student.enrollment.bolonha.BolonhaStudentOptionalEnrollmentBean

    }

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

        final BolonhaStudentOptionalEnrollmentBean optionalStudentEnrollmentBean =
                getBolonhaStudentOptionalEnrollmentBeanFromViewState();
        try {
            final RuleResult ruleResults =
                    EnrolBolonhaStudent.run(optionalStudentEnrollmentBean.getStudentCurricularPlan(),
                            optionalStudentEnrollmentBean.getExecutionPeriod(),
                            buildOptionalDegreeModuleToEnrolList(optionalStudentEnrollmentBean),
                            Collections.<CurriculumModule> emptyList(), getCurricularRuleLevel(form));

            if (ruleResults.isWarning()) {
                addRuleResultMessagesToActionMessages("warning", request, ruleResults);
            }

        } catch (EnrollmentDomainException ex) {
            addRuleResultMessagesToActionMessages("error", request, ex.getFalseResult());
            request.setAttribute("optionalEnrolmentBean", optionalStudentEnrollmentBean);

            return mapping.findForward("chooseOptionalCurricularCourseToEnrol");

        } catch (DomainException ex) {
            addActionMessage("error", request, ex.getKey(), ex.getArgs());
            request.setAttribute("optionalEnrolmentBean", optionalStudentEnrollmentBean);

            return mapping.findForward("chooseOptionalCurricularCourseToEnrol");
        }

        return prepareShowDegreeModulesToEnrol(mapping, form, request, response,
                optionalStudentEnrollmentBean.getStudentCurricularPlan(), optionalStudentEnrollmentBean.getExecutionPeriod());
    }
View Full Code Here

Examples of org.fenixedu.academic.dto.student.enrollment.bolonha.BolonhaStudentOptionalEnrollmentBean

        return result;
    }

    public ActionForward cancelChooseOptionalCurricularCourseToEnrol(ActionMapping mapping, ActionForm form,
            HttpServletRequest request, HttpServletResponse response) {
        final BolonhaStudentOptionalEnrollmentBean bolonhaStudentOptionalEnrollmentBean =
                getBolonhaStudentOptionalEnrollmentBeanFromViewState();
        return prepareShowDegreeModulesToEnrol(mapping, form, request, response,
                bolonhaStudentOptionalEnrollmentBean.getStudentCurricularPlan(),
                bolonhaStudentOptionalEnrollmentBean.getExecutionPeriod());
    }
View Full Code Here

Examples of org.fenixedu.academic.dto.student.enrollment.bolonha.BolonhaStudentOptionalEnrollmentBean

    }

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

        final BolonhaStudentOptionalEnrollmentBean optionalBean = getBolonhaStudentOptionalEnrollmentBeanFromViewState();
        request.setAttribute("optionalEnrolmentBean", optionalBean);
        RenderUtils.invalidateViewState();

        request.setAttribute("curricularRuleLabels", getLabels(optionalBean.getSelectedDegreeModuleToEnrol().getDegreeModule()
                .getCurricularRules(optionalBean.getExecutionPeriod())));

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

Examples of org.fenixedu.academic.dto.student.enrollment.bolonha.BolonhaStudentOptionalEnrollmentBean

public class DegreesByDegreeType implements DataProvider {

    @Override
    public Object provide(Object source, Object currentValue) {

        final BolonhaStudentOptionalEnrollmentBean optionalEnrollmentBean = (BolonhaStudentOptionalEnrollmentBean) source;
        List<Degree> result = null;
        if (optionalEnrollmentBean.hasDegreeType()) {
            result = Degree.readAllByDegreeType(optionalEnrollmentBean.getDegreeType());
            Collections.sort(result, Degree.COMPARATOR_BY_NAME);
        } else {
            result = Collections.EMPTY_LIST;
        }

        final Degree currentSelectedDegree = (Degree) currentValue;
        if (!result.contains(currentSelectedDegree)) {
            optionalEnrollmentBean.setDegree(null);
        }

        return result;
    }
View Full Code Here

Examples of org.fenixedu.academic.dto.student.enrollment.bolonha.BolonhaStudentOptionalEnrollmentBean

public class DegreeCurricularPlansForDegree implements DataProvider {

    @Override
    public Object provide(Object source, Object currentValue) {
        final BolonhaStudentOptionalEnrollmentBean optionalEnrollmentBean = (BolonhaStudentOptionalEnrollmentBean) source;

        final List<DegreeCurricularPlan> result = new ArrayList<DegreeCurricularPlan>();
        if (optionalEnrollmentBean.hasDegree() && optionalEnrollmentBean.hasDegreeType()) {
            if (optionalEnrollmentBean.getDegree().getDegreeType() == optionalEnrollmentBean.getDegreeType()) {
                result.addAll(optionalEnrollmentBean.getDegree().getDegreeCurricularPlansForYear(
                        optionalEnrollmentBean.getExecutionYear()));
            } else {
                optionalEnrollmentBean.setDegree(null);
                optionalEnrollmentBean.setDegreeType(null);
            }
        }

        Collections.sort(result, DegreeCurricularPlan.COMPARATOR_BY_NAME);

        final DegreeCurricularPlan currentSelectedDegreeCurricularPlan = (DegreeCurricularPlan) currentValue;
        if (!result.contains(currentSelectedDegreeCurricularPlan)) {
            optionalEnrollmentBean.setDegreeCurricularPlan(null);
        }

        return result;
    }
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.