Package org.fenixedu.academic.domain

Examples of org.fenixedu.academic.domain.Grade


    protected Layout getLayout(Object object, Class type) {
        return new Layout() {

            @Override
            public HtmlComponent createComponent(Object object, Class type) {
                Grade grade = (Grade) object;
                if (grade == null || grade.isEmpty()) {
                    return new HtmlText();
                }

                HtmlInlineContainer container = new HtmlInlineContainer();
                HtmlText gradeValue = new HtmlText(grade.getValue());
                gradeValue.setClasses(getGradeClasses());
                container.addChild(gradeValue);
                if (isShowGradeScale()) {
                    HtmlText gradeScale = new HtmlText("(" + RenderUtils.getEnumString(grade.getGradeScale()) + ")");
                    gradeScale.setClasses(getGradeScaleClasses());
                    container.addChild(gradeScale);
                }

                return container;
View Full Code Here


                getEnrolment().getLatestEnrolmentEvaluationBy(enrolmentEvaluationType);
        if (latestEnrolmentEvaluation == null) {
            return "--";
        }

        final Grade grade = latestEnrolmentEvaluation.getGrade();
        if (!latestEnrolmentEvaluation.isFinal()) {
            return BundleUtil.getString(Bundle.ENUMERATION, "msg.enrolled");
        } else if (grade.isEmpty() || grade.isNotEvaluated()) {
            return BundleUtil.getString(Bundle.ENUMERATION, "msg.notEvaluated");
        } else if (grade.isNotApproved()) {
            return BundleUtil.getString(Bundle.ENUMERATION, "msg.notApproved");
        } else if (!grade.isNumeric() && grade.isApproved()) {
            return BundleUtil.getString(Bundle.ENUMERATION, "msg.approved");
        } else {
            return grade.getValue();
        }
    }
View Full Code Here

        }
    }

    public String getLatestEnrolmentEvaluationInformation() {
        if (getEnrolment().isApproved()) {
            final Grade grade = getEnrolment().getGrade();

            if (grade.getGradeScale() == GradeScale.TYPEAP) {
                return BundleUtil.getString(Bundle.ENUMERATION, "msg.approved");
            } else {
                return grade.getValue();
            }
        } else {
            return BundleUtil.getString(Bundle.ENUMERATION, getEnrolment().getEnrollmentState().name());
        }
    }
View Full Code Here

    protected Layout getLayout(Object object, Class type) {
        return new Layout() {

            @Override
            public HtmlComponent createComponent(Object object, Class type) {
                Grade grade = (Grade) object;
                HtmlInlineContainer container = new HtmlInlineContainer();

                MetaSlot slot = (MetaSlot) getInputContext().getMetaObject();

                final HtmlGradeTextInput value = new HtmlGradeTextInput(isRequired());
                value.bind(slot);

                value.setMaxLength(getMaxLength());
                value.setSize(getSize());

                HtmlMenu menu = new HtmlMenu();
                menu.setName(slot.getKey().toString() + "_scale");

                menu.createDefaultOption(RenderUtils.getResourceString("renderers.menu.default.title"));
                for (GradeScale scale : GradeScale.values()) {
                    menu.createOption(RenderUtils.getEnumString(scale)).setValue(scale.getName());
                }

                if (grade != null && !grade.isEmpty()) {
                    value.setValue(grade.getValue());
                    menu.setValue(grade.getGradeScale().getName());
                }

                menu.setController(new HtmlController() {

                    @Override
View Full Code Here

        Date nowDate = new Date();
        for (MarkSheetTeacherMarkBean markBean : submissionBean.getSelectedMarksToSubmit()) {
            final Enrolment enrolment = markBean.getAttends().getEnrolment();
            CurricularCourse curricularCourse = enrolment.getCurricularCourse();
            final Grade grade = getGrade(markBean.getAttends(), markBean, markBean.getEvaluationDate(), nowDate);

            addMarkSheetEvaluationBeanToMap(markSheetsInformation, curricularCourse, executionCourse,
                    new MarkSheetEnrolmentEvaluationBean(enrolment, markBean.getEvaluationDate(), grade));
        }
    }
View Full Code Here

                            completedECTSCycle1 = completedECTSCycle1.add(weigth);
                        } else if (cycleType == CycleType.SECOND_CYCLE) {
                            completedECTSCycle2 = completedECTSCycle2.add(weigth);
                        }

                        final Grade grade = enrolment.getGrade();
                        if (grade.isNumeric()) {
                            final BigDecimal value = grade.getNumericValue();
                            factoredECTS = factoredECTS.add(weigth);
                            factoredGradeSum = factoredGradeSum.add(value.multiply(weigth));
                            if (cycleType == CycleType.FIRST_CYCLE) {
                                factoredECTSCycle1 = factoredECTSCycle1.add(weigth);
                                factoredGradeSumCycle1 = factoredGradeSumCycle1.add(value.multiply(weigth));
View Full Code Here

        this.setCurriculumValidationEvaluationPhase(evaluationPhase);
        setWeight(enrolment.getWeigth());

        if (this.getHasGrade()) {
            EnrolmentEvaluation enrolmentEvaluation = getLatestEnrolmentEvaluation();
            Grade grade = enrolmentEvaluation.getGrade();

            this.gradeValue = grade.getValue();
            this.evaluationDate = enrolmentEvaluation.getExamDate();
            this.bookReference = enrolmentEvaluation.getBookReference();
            this.page = enrolmentEvaluation.getPage();
            this.gradeScale = enrolmentEvaluation.getAssociatedGradeScale();
        }
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.