Package org.fenixedu.academic.domain

Examples of org.fenixedu.academic.domain.ExecutionCourse


        } else if (showOccupation instanceof InfoLessonInstanceAggregation) {
            final InfoLessonInstanceAggregation aggregation = (InfoLessonInstanceAggregation) showOccupation;

            final Shift shift = aggregation.getShift();
            final ExecutionCourse executionCourse = shift.getExecutionCourse();
            strBuffer.append(executionCourse.getSigla());

            strBuffer.append(" (");
            strBuffer.append("<a href='");
            strBuffer.append(context).append("/resourceAllocationManager/")
                    .append("manageShift.do?method=prepareEditShift&amp;page=0").append("&amp;shift_oid=")
                    .append(shift.getExternalId()).append("&amp;execution_course_oid=").append(executionCourse.getExternalId())
                    .append("&amp;" + PresentationConstants.ACADEMIC_INTERVAL + "=")
                    .append(executionCourse.getAcademicInterval().getResumedRepresentationInStringFormat())
                    .append("&amp;curricular_year_oid=").append(infoCurricularYear.getExternalId())
                    .append("&amp;execution_degree_oid=").append(infoExecutionDegree.getExternalId()).append("'>")
                    .append(shift.getShiftTypesCodePrettyPrint()).append("</a>").append(")&nbsp;");

            final Space allocatableSpace = aggregation.getAllocatableSpace();
View Full Code Here


            }
            strBuffer.append("</span>");
        } else if (showOccupation instanceof InfoLessonInstanceAggregation) {
            final InfoLessonInstanceAggregation infoLessonInstanceAggregation = (InfoLessonInstanceAggregation) showOccupation;

            final ExecutionCourse executionCourse = infoLessonInstanceAggregation.getShift().getExecutionCourse();
            final String siteUrl = executionCourse.getSiteUrl();

            strBuffer.append("<span class=\"float-left\">");
            // CONTENT / CHECKSUM prefixes have to be right before <a> tag
            if (Strings.isNullOrEmpty(siteUrl)) {
                strBuffer.append(executionCourse.getSigla());
            } else {
                strBuffer.append(GenericChecksumRewriter.NO_CHECKSUM_PREFIX);
                strBuffer.append("<a href=\"").append(context);
                strBuffer.append(siteUrl);
                strBuffer.append("\">");
                strBuffer.append(executionCourse.getSigla()).append("</a>");
            }
            strBuffer.append("&nbsp;").append("&nbsp;(")
                    .append(infoLessonInstanceAggregation.getShift().getShiftTypesCodePrettyPrint()).append(")&nbsp;");

            final Space allocatableSpace = infoLessonInstanceAggregation.getAllocatableSpace();
View Full Code Here

        } else if (showOccupation instanceof InfoLessonInstanceAggregation) {

            final InfoLessonInstanceAggregation aggregation = (InfoLessonInstanceAggregation) showOccupation;
            final Shift shift = aggregation.getShift();
            final ExecutionCourse executionCourse = shift.getExecutionCourse();
            final ExecutionSemester executionSemester = executionCourse.getExecutionPeriod();

            strBuffer.append(shift.getShiftTypesCodePrettyPrint()).append("&nbsp;");
            final Space allocatableSpace = aggregation.getAllocatableSpace();
            if (allocatableSpace != null) {
                strBuffer.append("<a href='").append(context).append("/publico/");
View Full Code Here

            return strBuffer;

        } else if (showOccupation instanceof InfoLessonInstanceAggregation) {
            final InfoLessonInstanceAggregation aggregation = (InfoLessonInstanceAggregation) showOccupation;

            final ExecutionCourse executionCourse = aggregation.getShift().getExecutionCourse();
            String siteUrl = executionCourse.getSiteUrl();
            if (Strings.isNullOrEmpty(siteUrl)) {
                strBuffer.append(executionCourse.getSigla());
            } else {
                strBuffer.append(GenericChecksumRewriter.NO_CHECKSUM_PREFIX);
                strBuffer.append("<a href=\"").append(context);
                strBuffer.append(siteUrl);
                strBuffer.append("\">");
                strBuffer.append(executionCourse.getSigla()).append("</a>");
            }
            strBuffer.append("&nbsp;").append("&nbsp;(").append(aggregation.getShift().getShiftTypesCodePrettyPrint())
                    .append(")&nbsp;");

            final Space allocatableSpace = aggregation.getAllocatableSpace();
View Full Code Here

        ArrayList<Shift> shiftList = new ArrayList<Shift>();

        if (grouping.getShiftType() != null) {
            for (final ExportGrouping exportGrouping : grouping.getExportGroupingsSet()) {
                final ExecutionCourse executionCourse = exportGrouping.getExecutionCourse();
                for (final Shift shf : executionCourse.getAssociatedShifts()) {
                    if (shf.containsType(grouping.getShiftType())) {
                        shiftList.add(shf);
                    }
                }
            }
View Full Code Here

    protected Boolean run(String infoExecutionCourseID, String newBibliographyTitle, String newBibliographyAuthors,
            String newBibliographyReference, String newBibliographyYear, Boolean newBibliographyOptional)
            throws FenixServiceException {

        final ExecutionCourse executionCourse = FenixFramework.getDomainObject(infoExecutionCourseID);
        if (executionCourse == null) {
            throw new InvalidArgumentsServiceException();
        }

        executionCourse.createBibliographicReference(newBibliographyTitle, newBibliographyAuthors, newBibliographyReference,
                newBibliographyYear, newBibliographyOptional);
        return true;
    }
View Full Code Here

        if (!StringUtils.isEmpty(executionCoursesNotLinked) && Boolean.valueOf(executionCoursesNotLinked)) {
            chooseNotLinked = true;
        }

        String executionPeriodId = RequestUtils.getAndSetStringToRequest(request, "executionPeriodId");
        ExecutionCourse executionCourse = FenixFramework.getDomainObject(executionCourseId);
        ExecutionSemester executionPeriod = FenixFramework.getDomainObject(executionPeriodId);

        ExecutionCourseBean sessionBean = new ExecutionCourseBean();
        sessionBean.setSourceExecutionCourse(executionCourse);
        sessionBean.setExecutionSemester(executionPeriod);
View Full Code Here

        String originExecutionDegreeId = RequestUtils.getAndSetStringToRequest(request, "originExecutionDegreeId");
        String curricularYearId = (String) dynaActionForm.get("curricularYearId");
        String[] shiftIdsToTransfer = (String[]) dynaActionForm.get("shiftIdsToTransfer");
        String[] curricularCourseIdsToTransfer = (String[]) dynaActionForm.get("curricularCourseIdsToTransfer");
        ExecutionDegree originExecutionDegree = FenixFramework.getDomainObject(originExecutionDegreeId);
        ExecutionCourse originExecutionCourse = FenixFramework.getDomainObject(executionCourseId);
        String originExecutionDegreesString = originExecutionCourse.getDegreePresentationString();
        String destinationExecutionCourseId = null;

        try {

            if (!StringUtils.isEmpty(destinationExecutionCourseIdString)
                    && StringUtils.isNumeric(destinationExecutionCourseIdString)) {
                destinationExecutionCourseId = destinationExecutionCourseIdString;
            } else {
                throw new DomainException("error.selection.noDestinationExecutionCourse");
            }

            ExecutionCourse destinationExecutionCourse =
                    SeperateExecutionCourse.run(executionCourseId, destinationExecutionCourseId, shiftIdsToTransfer,
                            curricularCourseIdsToTransfer);

            String destinationExecutionCourseName = destinationExecutionCourse.getNameI18N().getContent();
            if (StringUtils.isEmpty(destinationExecutionCourseName)) {
                destinationExecutionCourseName = destinationExecutionCourse.getName();
            }
            String destinationExecutionCourseCode = destinationExecutionCourse.getSigla();
            String destinationDegreeName = destinationExecutionCourse.getDegreePresentationString();
            String transferedCurricularCourses = makeObjectStringFromArray(curricularCourseIdsToTransfer, CurricularCourse.class);
            String transferedShifts;

            String successKey;
            if (shiftIdsToTransfer.length == 0) {
                successKey = "message.manager.executionCourseManagement.transferCourse.success.many.noShifts";
                transferedShifts = "";
            } else {
                successKey = "message.manager.executionCourseManagement.transferCourse.success.many";
                transferedShifts = makeObjectStringFromArray(shiftIdsToTransfer, Shift.class);
            }
            addActionMessage("success", request, successKey, transferedCurricularCourses, transferedShifts,
                    destinationExecutionCourseName, destinationDegreeName, destinationExecutionCourseCode);

            // check if degree context has changed
            if (!originExecutionCourse.getExecutionDegrees().contains(originExecutionDegree)) {
                // origin execution course degree has changed (no longer on original degree)
                String originCourseName = originExecutionCourse.getNameI18N().getContent();
                if (StringUtils.isEmpty(originCourseName)) {
                    originCourseName = originExecutionCourse.getName();
                }
                addActionMessage("info", request,
                        "message.manager.executionCourseManagement.transferCourse.success.switchContext", originCourseName,
                        originExecutionDegreesString, originExecutionCourse.getDegreePresentationString(),
                        destinationExecutionCourseName, destinationExecutionCourse.getDegreePresentationString(),
                        originExecutionDegree.getDegree().getSigla());
                request.setAttribute("executionCourseId", destinationExecutionCourse.getExternalId().toString());
            }

        } catch (DomainException e) {
            addActionMessage("error", request, e.getMessage(), e.getArgs());
            if (request.getAttribute("destinationExecutionDegreeId") != null) {
View Full Code Here

        String executionCourseId = RequestUtils.getAndSetStringToRequest(request, "executionCourseId");
        String originExecutionDegreeId = RequestUtils.getAndSetStringToRequest(request, "originExecutionDegreeId");
        String[] shiftIdsToTransfer = (String[]) dynaActionForm.get("shiftIdsToTransfer");
        String[] curricularCourseIdsToTransfer = (String[]) dynaActionForm.get("curricularCourseIdsToTransfer");
        ExecutionDegree originExecutionDegree = FenixFramework.getDomainObject(originExecutionDegreeId);
        ExecutionCourse originExecutionCourse = FenixFramework.getDomainObject(executionCourseId);
        String originExecutionDegreesString = originExecutionCourse.getDegreePresentationString();

        try {

            ExecutionCourse destinationExecutionCourse =
                    SeperateExecutionCourse.run(executionCourseId, null, shiftIdsToTransfer, curricularCourseIdsToTransfer);

            String destinationExecutionCourseName = destinationExecutionCourse.getNameI18N().getContent();
            if (StringUtils.isEmpty(destinationExecutionCourseName)) {
                destinationExecutionCourseName = destinationExecutionCourse.getName();
            }
            String destinationExecutionCourseCode = destinationExecutionCourse.getSigla();
            String destinationDegreeName = destinationExecutionCourse.getDegreePresentationString();
            String transferedCurricularCourses = makeObjectStringFromArray(curricularCourseIdsToTransfer, CurricularCourse.class);
            String transferedShifts;

            String successKey;
            if (shiftIdsToTransfer.length == 0) {
                successKey = "message.manager.executionCourseManagement.separate.success.create.noShifts";
                transferedShifts = "";
            } else {
                successKey = "message.manager.executionCourseManagement.separate.success.create";
                transferedShifts = makeObjectStringFromArray(shiftIdsToTransfer, Shift.class);
            }
            addActionMessage("success", request, successKey, destinationExecutionCourseName, destinationDegreeName,
                    destinationExecutionCourseCode, transferedCurricularCourses, transferedShifts);

            // check if degree context has changed
            if (!originExecutionCourse.getExecutionDegrees().contains(originExecutionDegree)) {
                // origin execution course degree has changed (no longer on original degree)
                String originCourseName = originExecutionCourse.getNameI18N().getContent();
                if (StringUtils.isEmpty(originCourseName)) {
                    originCourseName = originExecutionCourse.getName();
                }
                addActionMessage("info", request, "message.manager.executionCourseManagement.separate.success.switchContext",
                        originCourseName, originExecutionDegreesString, originExecutionCourse.getDegreePresentationString(),
                        destinationExecutionCourseName, destinationExecutionCourse.getDegreePresentationString(),
                        originExecutionDegree.getDegree().getSigla());
                request.setAttribute("executionCourseId", destinationExecutionCourse.getExternalId().toString());
            }

        } catch (DomainException e) {
            addActionMessage("error", request, e.getMessage(), e.getArgs());
            return prepareSeparate(mapping, dynaActionForm, request, response);
View Full Code Here

    protected void run(String executionCourseID, String name, Date begin, Date end, String description,
            Boolean onlineSubmissionsAllowed, Integer maxSubmissionsToKeep, String groupingID, GradeScale gradeScale,
            List<Department> departments) throws FenixServiceException {

        final ExecutionCourse executionCourse = FenixFramework.getDomainObject(executionCourseID);
        if (executionCourse == null) {
            throw new FenixServiceException("error.noExecutionCourse");
        }

        final Grouping grouping = (groupingID != null) ? FenixFramework.<Grouping> getDomainObject(groupingID) : null;
View Full Code Here

TOP

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

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.