Package org.fenixedu.academic.domain

Examples of org.fenixedu.academic.domain.Evaluation


     * @param Integer
     *            executionCourseID used in filtering
     *            (ExecutionCourseLecturingTeacherAuthorizationFilter)
     */
    protected void run(String executionCourseID, String evaluationID) throws FenixServiceException {
        final Evaluation evaluation = FenixFramework.getDomainObject(evaluationID);
        if (evaluation == null) {
            throw new FenixServiceException("error.noEvaluation");
        }
        evaluation.delete();
    }
View Full Code Here


    @Atomic
    public static void writeByStudent(final String executioCourseOID, final String evaluationOID, final List<StudentMark> marks)
            throws FenixServiceException {
        check(RolePredicates.TEACHER_PREDICATE);

        final Evaluation evaluation = FenixFramework.getDomainObject(evaluationOID);
        final ExecutionCourse executionCourse = FenixFramework.getDomainObject(executioCourseOID);

        writeMarks(convertMarks(executionCourse, marks), executionCourse, evaluation);
    }
View Full Code Here

    @Atomic
    public static void writeByAttend(final String executioCourseOID, final String evaluationOID, final List<AttendsMark> marks)
            throws FenixServiceException {
        check(RolePredicates.TEACHER_PREDICATE);

        final Evaluation evaluation = FenixFramework.getDomainObject(evaluationOID);
        final ExecutionCourse executionCourse = FenixFramework.getDomainObject(executioCourseOID);

        writeMarks(marks, executionCourse, evaluation);
    }
View Full Code Here

    protected Object run(String executionCourseCode, String evaluationCode, String publishmentMessage, Boolean sendSMS,
            String announcementTitle) throws ExcepcaoInexistente, FenixServiceException {

        final ExecutionCourse executionCourse = FenixFramework.getDomainObject(executionCourseCode);
        final Evaluation evaluation = FenixFramework.getDomainObject(evaluationCode);

        if (publishmentMessage == null || publishmentMessage.length() == 0) {
            evaluation.setPublishmentMessage(" ");
        } else {
            evaluation.setPublishmentMessage(publishmentMessage);
        }

        for (Mark mark : evaluation.getMarksSet()) {
            if (!mark.getMark().equals(mark.getPublishedMark())) {
                // update published mark
                mark.setPublishedMark(mark.getMark());
                if (sendSMS != null && sendSMS) {
                    if (mark.getAttend().getRegistration().getPerson().getDefaultMobilePhoneNumber() != null
View Full Code Here

    }

    private static void removeEvaluations(final ExecutionCourse executionCourseFrom, final ExecutionCourse executionCourseTo)
            throws FenixServiceException {
        while (!executionCourseFrom.getAssociatedEvaluationsSet().isEmpty()) {
            final Evaluation evaluation = executionCourseFrom.getAssociatedEvaluationsSet().iterator().next();
            if (evaluation instanceof FinalEvaluation) {
                final FinalEvaluation finalEvaluationFrom = (FinalEvaluation) evaluation;
                if (!finalEvaluationFrom.getMarksSet().isEmpty()) {
                    throw new FenixServiceException("Cannot merge execution courses: marks exist for final evaluation.");
                } else {
View Full Code Here

        return this.evaluation;
    }

    private Project getProject() {
        Evaluation evaluation = getEvaluation();
        if (evaluation != null && evaluation.getEvaluationType().equals(EvaluationType.PROJECT_TYPE)) {
            return (Project) evaluation;
        }

        return null;
View Full Code Here

        this.endMinute = endMinute;
    }

    public String getDescription() throws FenixServiceException {
        if (this.description == null && this.getEvaluation() != null) {
            final Evaluation writtenEvaluation = getEvaluation();
            if (writtenEvaluation instanceof WrittenTest) {
                this.description = ((WrittenTest) writtenEvaluation).getDescription();
            }
        } else if (this.getViewState().getAttribute("description") != null
                && !this.getViewState().getAttribute("description").equals("")) {
View Full Code Here

        setRequestAttribute("executionCourse", course);
        return "";
    }

    public Map<String, String> getMarks() throws FenixServiceException {
        final Evaluation evaluation = getEvaluation();
        final ExecutionCourse executionCourse = getExecutionCourse();
        if (executionCourse != null) {
            for (final Attends attends : getExecutionCourseAttends()) {
                final Mark mark = attends.getMarkByEvaluation(evaluation);
                if (mark != null && !marks.containsKey(attends.getExternalId())) {
View Full Code Here

        return result;
    }

    public String checkIfCanDistributeStudentsByRooms() throws FenixServiceException {
        try {
            final Evaluation writtenEvaluation = getEvaluation();
            ((WrittenEvaluation) writtenEvaluation).checkIfCanDistributeStudentsByRooms();
            return "enterDistributeStudentsByRooms";
        } catch (DomainException e) {
            setErrorMessage(e.getMessage());
            return "";
View Full Code Here

            return "";
        }
    }

    public boolean getExistsADistribution() {
        final Evaluation writtenEvaluation = getEvaluation();
        if (writtenEvaluation != null) {
            return !((WrittenEvaluation) writtenEvaluation).getWrittenEvaluationEnrolmentsSet().isEmpty();
        }
        return false;
    }
View Full Code Here

TOP

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

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.