Package org.fenixedu.academic.dto

Examples of org.fenixedu.academic.dto.InfoRoomOccupation


                                    // Obter o num de lugares de exame das salas
                                    List roomOccupation = season1Exam.getWrittenEvaluationSpaceOccupations();
                                    int numLugaresSalas = 0;

                                    for (int iterRO = 0; iterRO < roomOccupation.size(); iterRO++) {
                                        InfoRoomOccupation infoRO = (InfoRoomOccupation) roomOccupation.get(iterRO);

                                        numLugaresSalas += infoRO.getInfoRoom().getCapacidadeExame().intValue();
                                    }

                                    int numLugaresAPreencher = numAlunos.intValue() - numLugaresSalas;

                                    // if (numLugaresAPreencher < 0)
                                    // numLugaresAPreencher = 0;

                                    strBuffer.append(numLugaresAPreencher);
                                    strBuffer.append(getMessageResource(pageContext, "public.degree.information.label.places"));

                                    strBuffer.append("</td>");
                                    strBuffer.append("<td>");
                                }

                                List infoRoomOccupations = season1Exam.getWrittenEvaluationSpaceOccupations();

                                if (infoRoomOccupations != null && infoRoomOccupations.size() > 0) {
                                    if (user.equals("sop")) {
                                        strBuffer
                                                .append(getMessageResource(pageContext, "public.degree.information.label.rooms"));
                                        strBuffer.append("<br/>");
                                    } else if (user.equals("public")) {
                                        strBuffer.append("<td class='" + rowClass + "'>");
                                    }

                                    for (int iterIRO = 0; iterIRO < infoRoomOccupations.size(); iterIRO++) {
                                        InfoRoomOccupation infoRoomOccupation =
                                                (InfoRoomOccupation) infoRoomOccupations.get(iterIRO);

                                        strBuffer.append(infoRoomOccupation.getInfoRoom().getNome() + "; ");
                                    }
                                } else {
                                    if (user.equals("sop")) {
                                        strBuffer.append("-");
                                    } else if (user.equals("public")) {
                                        strBuffer.append("<td class='" + rowClass + "'>");
                                        strBuffer.append("<i>");
                                        strBuffer.append(getMessageResource(pageContext,
                                                "public.degree.information.label.noRoomsAttributed"));
                                        strBuffer.append("</i>");
                                    }
                                }

                                if (user.equals("sop")) {
                                    strBuffer.append("</td>");
                                    strBuffer.append("<td>");

                                    strBuffer
                                            .append("<a href='" + addPublicPrefix("showExamsManagement.do")
                                                    + "?method=delete&amp;" + PresentationConstants.EXECUTION_COURSE_OID + "="
                                                    + infoExecutionCourse.getExternalId() + "&amp;"
                                                    + PresentationConstants.EXECUTION_PERIOD_OID + "="
                                                    + infoExecutionCourse.getInfoExecutionPeriod().getExternalId() + "&amp;"
                                                    + PresentationConstants.EXECUTION_DEGREE_OID + "="
                                                    + examsMap.getInfoExecutionDegree().getExternalId() + "&amp;"
                                                    + PresentationConstants.CURRICULAR_YEAR_OID + "=" + curricularYear.toString()
                                                    + "&amp;" + PresentationConstants.EXAM_OID + "="
                                                    + season1Exam.getExternalId() + "'>");
                                    strBuffer.append(getMessageResource(pageContext, "public.degree.information.label.delete"));
                                    strBuffer.append("</a>");
                                    strBuffer.append("</td>");
                                }
                            }

                            if (season2Exam != null) {
                                if (user.equals("sop")) {
                                    strBuffer.append("<tr>");

                                    strBuffer.append("<td>");

                                    strBuffer
                                            .append("<a href='" + addPublicPrefix("showExamsManagement.do") + "?method=edit&amp;"
                                                    + PresentationConstants.EXECUTION_COURSE_OID + "="
                                                    + infoExecutionCourse.getExternalId() + "&amp;"
                                                    + PresentationConstants.EXECUTION_PERIOD_OID + "="
                                                    + infoExecutionCourse.getInfoExecutionPeriod().getExternalId() + "&amp;"
                                                    + PresentationConstants.EXECUTION_DEGREE_OID + "="
                                                    + examsMap.getInfoExecutionDegree().getExternalId() + "&amp;"
                                                    + PresentationConstants.CURRICULAR_YEAR_OID + "=" + curricularYear.toString()
                                                    + "&amp;" + PresentationConstants.EXAM_OID + "="
                                                    + season2Exam.getExternalId() + "'>");
                                }

                                if (user.equals("sop")) {
                                    strBuffer.append("2&ordf; ");
                                    strBuffer.append(getMessageResource(pageContext, "public.degree.information.label.times"));
                                    strBuffer.append("</a>");
                                    strBuffer.append("</td>");
                                    strBuffer.append("<td>");
                                    strBuffer.append(season2Exam.getDate());
                                    strBuffer.append("<br/>");
                                    strBuffer.append(season2Exam.getBeginningHour());
                                    strBuffer.append("-");
                                    strBuffer.append(season2Exam.getEndHour());
                                } else if (user.equals("public")) {
                                    strBuffer.append("<td class='" + rowClass + "'>");
                                    strBuffer.append(season2Exam.getDate());
                                    strBuffer.append("</td>");
                                    strBuffer.append("<td class='" + rowClass + "'>");
                                    strBuffer.append(season2Exam.getBeginningHour());
                                    strBuffer.append("</td>");
                                    // strBuffer.append("-");
                                    // strBuffer.append(season2Exam.getEndHour())
                                    // ;
                                }

                                if (user.equals("sop")) {
                                    strBuffer.append("</td>");
                                    strBuffer.append("<td>");
                                    // Integer numAlunos =
                                    // infoExecutionCourse.
                                    // getNumberOfAttendingStudents();
                                    Integer numAlunos = season2Exam.getEnrolledStudents();

                                    strBuffer.append(numAlunos);
                                    strBuffer.append(getMessageResource(pageContext,
                                            "public.degree.information.label.enrolledPupils"));

                                    strBuffer.append("</td>");
                                    strBuffer.append("<td>");
                                    strBuffer.append(getMessageResource(pageContext, "public.degree.information.label.lack"));

                                    // Obter o num de lugares de exame das salas
                                    List roomOccupation = season2Exam.getWrittenEvaluationSpaceOccupations();
                                    int numLugaresSalas = 0;

                                    for (int iterRO = 0; iterRO < roomOccupation.size(); iterRO++) {
                                        InfoRoomOccupation infoRO = (InfoRoomOccupation) roomOccupation.get(iterRO);

                                        numLugaresSalas += infoRO.getInfoRoom().getCapacidadeExame().intValue();
                                    }

                                    int numLugaresAPreencher = numAlunos.intValue() - numLugaresSalas;

                                    // if (numLugaresAPreencher < 0)
                                    // numLugaresAPreencher = 0;

                                    strBuffer.append(numLugaresAPreencher);
                                    strBuffer.append(getMessageResource(pageContext, "public.degree.information.label.places"));
                                    strBuffer.append("</td>");

                                    strBuffer.append("<td>");
                                }

                                List infoRoomOccupations = season2Exam.getWrittenEvaluationSpaceOccupations();

                                if (infoRoomOccupations != null && infoRoomOccupations.size() > 0) {
                                    if (user.equals("sop")) {
                                        strBuffer.append(getMessageResource(pageContext, "public.degree.information.label.rooms")
                                                + ":");
                                        strBuffer.append("<br/>");
                                    } else if (user.equals("public")) {
                                        strBuffer.append("<td class='" + rowClass + "'>");
                                    }

                                    for (int iterIRO = 0; iterIRO < infoRoomOccupations.size(); iterIRO++) {
                                        InfoRoomOccupation infoRoomOccupation =
                                                (InfoRoomOccupation) infoRoomOccupations.get(iterIRO);

                                        strBuffer.append(infoRoomOccupation.getInfoRoom().getNome() + "; ");
                                    }

                                    if (user.equals("public")) {
                                        strBuffer.append("</td>");
                                    }
View Full Code Here


                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

TOP

Related Classes of org.fenixedu.academic.dto.InfoRoomOccupation

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.