Examples of InfoExam


Examples of org.fenixedu.academic.dto.InfoExam

                strBuffer.append(executionSemester.getExternalId()).append("'>");
                strBuffer.append(allocatableSpace.getName()).append("</a>");
            }

        } else if (showOccupation instanceof InfoExam) {
            InfoExam infoExam = (InfoExam) showOccupation;
            for (int iterEC = 0; iterEC < infoExam.getAssociatedExecutionCourse().size(); iterEC++) {
                InfoExecutionCourse infoEC = infoExam.getAssociatedExecutionCourse().get(iterEC);
                if (iterEC != 0) {
                    strBuffer.append(", ");
                }
                strBuffer.append(infoEC.getSigla());
            }
            strBuffer.append(" - ");
            strBuffer.append(infoExam.getSeason().getSeason());
            strBuffer.append("ยช época");

        } else if (showOccupation instanceof InfoWrittenTest) {
            InfoWrittenTest infoWrittenTest = (InfoWrittenTest) showOccupation;
            for (int iterEC = 0; iterEC < infoWrittenTest.getAssociatedExecutionCourse().size(); iterEC++) {
View Full Code Here

Examples of org.fenixedu.academic.dto.InfoExam

    @Override
    public StringBuilder renderDayContents(ExamsMapSlot examsMapSlot, ExamsMap examsMap, String typeUser, PageContext pageContext) {
        StringBuilder strBuffer = new StringBuilder();

        for (int i = 0; i < examsMapSlot.getExams().size(); i++) {
            InfoExam infoExam = (InfoExam) examsMapSlot.getExams().get(i);
            // InfoExecutionCourse infoExecutionCourse =
            // infoExam.getInfoExecutionCourse();
            String courseInitials = infoExam.getInfoExecutionCourse().getSigla();

            strBuffer.append("<b><span class='redtxt'>");

            strBuffer.append(courseInitials);
            // strBuffer.append("</a>");

            if (infoExam.getBeginning() != null) {
                String hoursText = infoExam.getBeginning().get(Calendar.HOUR_OF_DAY) + "H";
                strBuffer.append(" ");
                strBuffer.append(getMessageResource(pageContext, "public.degree.information.label.as"));
                strBuffer.append(" ");
                strBuffer.append(hoursText);
            }
View Full Code Here

Examples of org.fenixedu.academic.dto.InfoExam

        for (int i = 0; i < executionCourses.size(); i++) {
            InfoExecutionCourse infoExecutionCourse = (InfoExecutionCourse) executionCourses.get(i);
            List infoExams = infoExecutionCourse.getAssociatedInfoExams();

            for (int j = 0; j < infoExams.size(); j++) {
                InfoExam infoExam = (InfoExam) infoExams.get(j);

                if (sameDayAsExam(day, infoExam)) {
                    infoExam.setInfoExecutionCourse(infoExecutionCourse);
                    result.add(infoExam);
                }
            }
        }
View Full Code Here

Examples of org.fenixedu.academic.dto.InfoExam

    private List<InfoExam> findExamsFromListOfExams(Calendar day, List infoExams) {
        List<InfoExam> result = new ArrayList<InfoExam>();

        for (int j = 0; j < infoExams.size(); j++) {
            InfoExam infoExam = (InfoExam) infoExams.get(j);

            if (sameDayAsExam(day, infoExam)) {
                result.add(infoExam);
            }
        }
View Full Code Here

Examples of org.fenixedu.academic.dto.InfoExam

                        strBuffer.append("<i>").append(getMessageResource(pageContext, "no.exams.for.curricular.year"))
                                .append("</i>");
                        strBuffer.append("</td>");
                    } else {
                        // Get 1st season exam
                        InfoExam season1Exam =
                                (InfoExam) CollectionUtils.find(infoExecutionCourse.getAssociatedInfoExams(), new Predicate() {
                                    @Override
                                    public boolean evaluate(Object obj) {
                                        InfoExam infoExam = (InfoExam) obj;
                                        return infoExam.getSeason().equals(new Season(Season.SEASON1));
                                    }
                                });
                        // Get 2nd season exam
                        InfoExam season2Exam =
                                (InfoExam) CollectionUtils.find(infoExecutionCourse.getAssociatedInfoExams(), new Predicate() {
                                    @Override
                                    public boolean evaluate(Object obj) {
                                        InfoExam infoExam = (InfoExam) obj;
                                        return infoExam.getSeason().equals(new Season(Season.SEASON2));
                                    }
                                });

                        if (user.equals("public")) {
                            if (season1Exam == null && !hasComment) {
View Full Code Here

Examples of org.fenixedu.academic.dto.InfoExam

    }

    private void writeLineForExecutionCourseAndExamOfSeason(StringBuilder strBuffer, InfoExecutionCourse infoExecutionCourse,
            int season) {
        for (int j = 0; j < infoExecutionCourse.getAssociatedInfoExams().size(); j++) {
            InfoExam infoExam = infoExecutionCourse.getAssociatedInfoExams().get(j);
            if (infoExam.getSeason().getSeason().intValue() == season) {
                strBuffer.append("<td>" + season + "&ordf; </td>");
                strBuffer.append("<td>" + infoExam.getDate() + "</td>");
                strBuffer.append("<td>" + infoExam.getBeginningHour() + "</td>");
                strBuffer.append("<td>" + infoExam.getEndHour() + "</td>");
                strBuffer.append("<td>");
                ComparatorChain comparatorChain = new ComparatorChain();
                comparatorChain.addComparator(new BeanComparator("infoRoom.capacidadeExame"), true);
                comparatorChain.addComparator(new BeanComparator("infoRoom.nome"));
                Collections.sort(infoExam.getWrittenEvaluationSpaceOccupations(), comparatorChain);
                for (int k = 0; k < infoExam.getWrittenEvaluationSpaceOccupations().size(); k++) {
                    if (k > 0) {
                        strBuffer.append(" ");
                    }

                    InfoRoomOccupation infoRoomOccupation = infoExam.getWrittenEvaluationSpaceOccupations().get(k);
                    strBuffer.append(infoRoomOccupation.getInfoRoom().getNome());
                }
                strBuffer.append("</td>");

            }
View Full Code Here

Examples of org.fenixedu.academic.dto.InfoExam

                    String start = null;
                    String end = null;
                    String weekday = null;

                    if (infoWrittenEvaluation instanceof InfoExam) {
                        InfoExam infoExam = (InfoExam) infoWrittenEvaluation;
                        start = infoExam.getBeginningHour();
                        end = infoExam.getEndHour();
                        weekday = infoWrittenEvaluation.getDiaSemana().getDiaSemanaString();

                        FenixPeriod period = new FenixPeriod(day + " " + start, day + " " + end);

                        Integer season = infoExam.getSeason().getSeason();

                        roomEvent =
                                new FenixRoomEvent.WrittenEvaluationEvent.ExamEvent(start, end, weekday, day, period, courses,
                                        season);
View Full Code Here

Examples of org.fenixedu.academic.dto.InfoExam

    private List<InfoExam> obtainInfoExams(ExecutionDegree executionDegree, String executionPeriodId,
            Integer wantedCurricularYear, ExecutionCourse executionCourse) {
        List<InfoExam> result = new ArrayList<InfoExam>();
        for (Exam exam : executionCourse.getAssociatedExams()) {
            InfoExam infoExam =
                    InfoExamWithRoomOccupationsAndScopesWithCurricularCoursesWithDegreeAndSemesterAndYear.newInfoFromDomain(exam);
            int numberOfStudentsForExam = 0;
            Set<CurricularCourse> checkedCurricularCourses = new HashSet<CurricularCourse>();
            for (DegreeModuleScope degreeModuleScope : exam.getDegreeModuleScopes()) {
                CurricularCourse curricularCourse = degreeModuleScope.getCurricularCourse();
                if (!checkedCurricularCourses.contains(curricularCourse)) {
                    checkedCurricularCourses.add(curricularCourse);
                    ExecutionSemester executionSemester = FenixFramework.getDomainObject(executionPeriodId);
                    int numberEnroledStudentsInCurricularCourse =
                            curricularCourse.countEnrolmentsByExecutionPeriod(executionSemester);
                    numberOfStudentsForExam += numberEnroledStudentsInCurricularCourse;
                }

                boolean isCurricularYearEqual = degreeModuleScope.getCurricularYear().equals(wantedCurricularYear);
                DegreeCurricularPlan degreeCurricularPlanFromScope =
                        degreeModuleScope.getCurricularCourse().getDegreeCurricularPlan();
                DegreeCurricularPlan degreeCurricularPlanFromExecutionDegree = executionDegree.getDegreeCurricularPlan();
                boolean isCurricularPlanEqual = degreeCurricularPlanFromScope.equals(degreeCurricularPlanFromExecutionDegree);

                if (isCurricularYearEqual && isCurricularPlanEqual && !result.contains(infoExam)) {
                    result.add(infoExam);
                    break;
                }
            }
            infoExam.setEnrolledStudents(Integer.valueOf(numberOfStudentsForExam));
        }
        return result;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.