Package org.fenixedu.academic.domain

Examples of org.fenixedu.academic.domain.Grade


        DateTime processingDate = computeProcessingDateToLockECTSTableUse();

        if (entry instanceof IEnrolment) {
            IEnrolment enrolment = (IEnrolment) entry;
            try {
                Grade grade =
                        enrolment.getEctsGrade(getDocumentRequest().getRegistration().getLastStudentCurricularPlan(),
                                processingDate);
                return grade.getValue();
            } catch (NoEctsComparabilityTableFound nectfe) {
                return "--";
            }
        } else if (entry instanceof Dismissal && ((Dismissal) entry).getCredits().isEquivalence()) {
            Dismissal dismissal = ((Dismissal) entry);
            try {
                Grade grade = dismissal.getEctsGrade(processingDate);
                return grade.getValue();
            } catch (NoEctsComparabilityTableFound nectfe) {
                return "--";
            }
        } else {
            throw new Error("The roof is yet again on fire!");
View Full Code Here


                    curricularCourseJsonObject.addProperty("total", entry.getTotal());

                    JsonArray gradesArray = new JsonArray();
                    for (Enrolment enrolment : entry.enrolmentList) {
                        Grade grade = enrolment.getGrade();
                        JsonObject enrolmentJson = new JsonObject();
                        if (grade != null && grade.isApproved()) {
                            enrolmentJson.addProperty("grade", grade.getIntegerValue());
                        } else if (grade.isNotEvaluated()) {
                            enrolmentJson.addProperty("grade", "NA");
                        } else if (grade.isNotApproved()) {
                            enrolmentJson.addProperty("grade", "RE");
                        }
                        gradesArray.add(enrolmentJson);
                    }
                    curricularCourseJsonObject.add("grades", gradesArray);
View Full Code Here

            plus(enrolment);
        }

        public CurricularCourseGradeEntry plus(Enrolment enrolment) {
            enrolmentList.add(enrolment);
            Grade grade = enrolment.getGrade();
            if (grade == null || grade.isEmpty()) {
                attending++;
            } else if (grade.isApproved()) {
                approved++;
                if (grade.getGradeScale() == GradeScale.TYPE20) {
                    sum = sum.add(grade.getNumericValue());
                    quantity++;
                }
            } else if (grade.isNotEvaluated()) {
                notEvaluated++;
            } else if (grade.isNotApproved()) {
                flunked++;
            }
            return this;
        }
View Full Code Here

        public CurricularYearGradeEntry(Enrolment enrolment) {
            plus(enrolment);
        }

        public CurricularYearGradeEntry plus(Enrolment enrolment) {
            Grade grade = enrolment.getGrade();
            if (grade == null || grade.isEmpty()) {
                attending++;
            } else if (grade.isApproved()) {
                approved++;
                if (grade.getGradeScale() == GradeScale.TYPE20) {
                    sum = sum.add(grade.getNumericValue());
                    quantity++;
                }
            } else if (grade.isNotEvaluated()) {
                notEvaluated++;
            } else if (grade.isNotApproved()) {
                flunked++;
            }
            return this;
        }
View Full Code Here

        if (getDocumentRequest().isToShowCredits()) {
            getCreditsInfo(result, entry);
        }
        result.append(BundleUtil.getString(Bundle.ACADEMIC, getDocumentRequest().getLanguage(), "label.with"));

        final Grade grade = entry.getGrade();
        result.append(SINGLE_SPACE).append(grade.getValue());
        result.append(StringUtils.rightPad(
                "(" + BundleUtil.getString(Bundle.ENUMERATION, getDocumentRequest().getLanguage(), grade.getValue()) + ")",
                SUFFIX_LENGTH, ' '));
        String values = BundleUtil.getString(Bundle.ACADEMIC, getDocumentRequest().getLanguage(), "values");
        result.append(grade.isNumeric() ? values : StringUtils.rightPad(EMPTY_STR, values.length(), ' '));

        return result.toString();
    }
View Full Code Here

        return getGrade().getValue();
    }

    @Override
    public Grade getEctsGrade(StudentCurricularPlan scp, DateTime processingDate) {
        Grade grade = getGrade();
        Set<Dismissal> dismissals = new HashSet<Dismissal>();
        for (EnrolmentWrapper wrapper : getEnrolmentWrappersSet()) {
            if (wrapper.getCredits().getStudentCurricularPlan().equals(scp)) {
                for (Dismissal dismissal : wrapper.getCredits().getDismissalsSet()) {
                    dismissals.add(dismissal);
View Full Code Here

            if (evaluation.getMarkSheet() == null) {
                continue;
            }

            final String gradeValue = evaluation.getGradeValue();
            final Grade evaluationMark = getEvaluationMark();
            final String evaluationMarkValue = evaluationMark == null ? null : evaluationMark.getValue();
            if (gradeValue.equals(evaluationMarkValue)) {
                return true;
            } else {
                throw new DomainException("thesis.approve.evaluation.has.different.mark", gradeValue);
            }
View Full Code Here

                final ExternalEnrolment externalEnrolment, final int level) {
            generateCellWithText(externalEnrolmentRow, externalEnrolment.getDescription(), getLabelCellClass(), 1);
        }

        private void generateGradeCell(HtmlTableRow enrolmentRow, final ICurriculumEntry entry) {
            final Grade grade = entry.getGrade();
            generateCellWithText(enrolmentRow, grade.isEmpty() ? "-" : grade.getValue(), getGradeCellClass());
        }
View Full Code Here

            generateCellWithText(enrolmentRow, evaluation.getEnrolmentEvaluationTypeDescription(), getLabelCellClass(),
                    MAX_COL_SPAN_FOR_TEXT_ON_CURRICULUM_LINES - level);
            generateCellWithText(enrolmentRow, "", getEnrolmentTypeCellClass(), ENROLLMENT_EVALUATION_TYPE_NEXT_COLUMN_SPAN);

            final Grade grade = evaluation.getGrade();
            generateCellWithText(enrolmentRow, grade.isEmpty() ? EMPTY_INFO : grade.getValue(), getGradeCellClass());

            generateCellWithText(enrolmentRow, "", getEctsCreditsCellClass(), GRADE_NEXT_COLUMN_SPAN);

            if (evaluation.getExecutionPeriod() != null) {
                generateCellWithText(enrolmentRow, evaluation.getExecutionPeriod().getExecutionYear().getYear(),
View Full Code Here

            generateCellWithText(enrolmentRow, weight, getWeightCellClass());
        }

        private void generateEnrolmentGradeCell(HtmlTableRow enrolmentRow, IEnrolment enrolment) {
            final Grade grade = enrolment.getGrade();
            generateCellWithText(enrolmentRow, grade.isEmpty() ? EMPTY_INFO : grade.getValue(), getGradeCellClass());
        }
View Full Code Here

TOP

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

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.