Package org.fenixedu.academic.domain

Examples of org.fenixedu.academic.domain.CompetenceCourse


        return builder.toString();
    }

    private BibliographicReferences getBibliographicReferences(final CurricularCourse curricularCourse,
            final ExecutionSemester executionSemester) {
        final CompetenceCourse competenceCourse = curricularCourse.getCompetenceCourse();
        return competenceCourse == null ? null : competenceCourse.getBibliographicReferences(executionSemester);
    }
View Full Code Here


    }

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

        CompetenceCourse course = getCompetenceCourse(request);
        ExecutionSemester period = getExecutionPeriod(request);

        CompetenceCourseInformationRequestBean bean = null;
        IViewState viewState = RenderUtils.getViewState("editVersion");
        CompetenceCourseInformation information = null;
        if (viewState != null) {
            bean = (CompetenceCourseInformationRequestBean) viewState.getMetaObject().getObject();
            ExecutionSemester beanPeriod = bean.getExecutionPeriod();
            if (beanPeriod == null) {
                beanPeriod = ExecutionSemester.readActualExecutionSemester();
                bean.setExecutionPeriod(beanPeriod);
            }
            information = bean.getCompetenceCourse().findCompetenceCourseInformationForExecutionPeriod(beanPeriod);
        }

        if (bean == null) {
            bean =
                    new CompetenceCourseInformationRequestBean(
                            course.findCompetenceCourseInformationForExecutionPeriod((period != null) ? period : ExecutionSemester
                                    .readActualExecutionSemester()));
        } else {
            if (information == null) {
                bean.reset();
            } else {
                bean.update(information);
            }
        }

        IViewState viewStateLoad = RenderUtils.getViewState("editVersionLoad");
        CompetenceCourseLoadBean load;
        if (viewStateLoad != null) {
            load = (CompetenceCourseLoadBean) viewStateLoad.getMetaObject().getObject();
        } else {
            if (information != null && information.getCompetenceCourseLoadsSet().size() > 0) {
                load = new CompetenceCourseLoadBean(information.getCompetenceCourseLoadsSet().iterator().next());
            } else if (period != null
                    && course.findCompetenceCourseInformationForExecutionPeriod(period).getCompetenceCourseLoadsSet().size() > 0) {
                load =
                        new CompetenceCourseLoadBean(course.findCompetenceCourseInformationForExecutionPeriod(period)
                                .getCompetenceCourseLoadsSet().iterator().next());
            } else {
                load = new CompetenceCourseLoadBean();
            }
        }
View Full Code Here

        }
        CompetenceCourseInformationRequestBean bean =
                (CompetenceCourseInformationRequestBean) viewState.getMetaObject().getObject();
        CompetenceCourseLoadBean load =
                (CompetenceCourseLoadBean) RenderUtils.getViewState("editVersionLoad").getMetaObject().getObject();
        CompetenceCourse course = bean.getCompetenceCourse();
        if (!course.isLoggedPersonAllowedToCreateChangeRequests(bean.getExecutionPeriod())) {
            addActionMessage(request, "error.cannot.create.request.in.chosen.semester");
            return forwardToViewVersions(mapping, request, course);
        }
        try {
            createCompetenceCourseInformationChangeRequest(bean, load, getLoggedPerson(request));
View Full Code Here

    @Atomic
    private static void createCompetenceCourseInformationChangeRequest(CompetenceCourseInformationRequestBean bean,
            CompetenceCourseLoadBean loadBean, Person requestor) {
        check(RolePredicates.BOLONHA_MANAGER_PREDICATE);
        CompetenceCourse course = bean.getCompetenceCourse();
        ExecutionSemester period = bean.getExecutionPeriod();
        CompetenceCourseInformationChangeRequest request = course.getChangeRequestDraft(period);
        if (request != null) {
            request.edit(bean.getName(), bean.getNameEn(), bean.getJustification(), bean.getRegime(), bean.getObjectives(),
                    bean.getObjectivesEn(), bean.getProgram(), bean.getProgramEn(), bean.getEvaluationMethod(),
                    bean.getEvaluationMethodEn(), bean.getCompetenceCourseLevel(), requestor, loadBean.getTheoreticalHours(),
                    loadBean.getProblemsHours(), loadBean.getLaboratorialHours(), loadBean.getSeminaryHours(),
View Full Code Here

    }

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

        CompetenceCourse course = getCompetenceCourse(request);
        return forwardToViewVersions(mapping, request, course);
    }
View Full Code Here

    }

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

        CompetenceCourse course = getCompetenceCourse(request);
        String externalId = request.getParameter("oid");

        for (CompetenceCourseInformation information : course.getCompetenceCourseInformationsSet()) {
            if (information.getExternalId().equals(externalId)) {
                request.setAttribute("information", information);
            }
        }
View Full Code Here

            throw new DomainException("error.request.already.processed");
        }
        setApproved(true);
        setAnalizedBy(analisedBy);

        CompetenceCourse course = getCompetenceCourse();

        ExecutionSemester executionSemester = getExecutionPeriod();
        CompetenceCourseInformation information = null;
        if (course.isCompetenceCourseInformationDefinedAtExecutionPeriod(executionSemester)) {
            information = course.findCompetenceCourseInformationForExecutionPeriod(executionSemester);
            information.edit(getName(), getNameEn(), information.getBasic(), getCompetenceCourseLevel(),
                    getCompetenceCourseGroupUnit());
            information.setRegime(getRegime());
            information.edit(getObjectives(), getProgram(), getEvaluationMethod(), getObjectivesEn(), getProgramEn(),
                    getEvaluationMethodEn());

            information.setBibliographicReferences(getBibliographicReferences());

            for (; !information.getCompetenceCourseLoadsSet().isEmpty(); information.getCompetenceCourseLoadsSet().iterator()
                    .next().delete()) {
                ;
            }
            createLoads(information);

        } else {
            information =
                    new CompetenceCourseInformation(getName(), getNameEn(), course.isBasic(), getRegime(),
                            getCompetenceCourseLevel(), getExecutionPeriod(), getCompetenceCourseGroupUnit());
            information.edit(getObjectives(), getProgram(), getEvaluationMethod(), getObjectivesEn(), getProgramEn(),
                    getEvaluationMethodEn());
            information.setAcronym(course.getAcronym());
            information.setBibliographicReferences(getBibliographicReferences());
            course.addCompetenceCourseInformations(information);

            createLoads(information);
        }
    }
View Full Code Here

            HttpServletResponse response) throws FenixActionException, FenixServiceException {

        CourseStatisticsBean bean = getRenderedObject("courseStatisticsBean");
        RenderUtils.invalidateViewState();
        if (bean == null) {
            CompetenceCourse competenceCourse = getDomainObject(request, "competenceCourseId");
            ExecutionSemester executionSemester = getDomainObject(request, "executionSemesterId");
            if (competenceCourse == null) {
                return prepareListCourses(mapping, form, request, response);
            }
            bean = new CourseStatisticsBean(getDepartment(request), competenceCourse, executionSemester);
View Full Code Here

    }

    public ActionForward downloadExcel(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) throws FenixActionException, FenixServiceException {
        Degree degree = getDomainObject(request, "degreeId");
        CompetenceCourse competenceCourse = getDomainObject(request, "competenceCourseId");
        ExecutionSemester executionSemester = getDomainObject(request, "executionSemesterId");

        exportStudentsToExcel(response, getCurricularCourseToExport(competenceCourse, degree),
                executionSemester.getExecutionYear());
        return null;
View Full Code Here

        CourseStatisticsBean bean = getRenderedObject("courseStatisticsBean");
        RenderUtils.invalidateViewState();
        if (bean == null) {
            Degree degree = getDomainObject(request, "degreeId");
            CompetenceCourse competenceCourse = getDomainObject(request, "competenceCourseId");
            ExecutionSemester executionSemester = getDomainObject(request, "executionSemesterId");
            if (competenceCourse == null || degree == null) {
                return prepareListCourses(mapping, form, request, response);
            }
            bean = new CourseStatisticsBean(getDepartment(request), competenceCourse, degree, executionSemester);
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.domain.CompetenceCourse

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.