if (iep.getIdInternal() == iois.getKeyExecutionPeriod()) {
if (iep.equals(iois.getExecutionPeriod())) {
    public ActionForward viewDegreeEvaluation(ActionMapping mapping, ActionForm actionForm,            HttpServletRequest request, HttpServletResponse response) throws Exception {        IUserView userView = (IUserView) request.getSession().getAttribute(SessionConstants.U_VIEW);        ActionErrors errors = new ActionErrors();        Integer degreeId = getFromRequest("degreeID", request);        request.setAttribute("degreeID", degreeId);        Integer executionDegreeId = getFromRequest("executionDegreeID", request);        request.setAttribute("executionDegreeId", executionDegreeId);        Integer degreeCurricularPlanId = getFromRequest("degreeCurricularPlanID", request);        request.setAttribute("degreeCurricularPlanID", degreeCurricularPlanId);        Boolean inEnglish = getFromRequestBoolean("inEnglish", request);        request.setAttribute("inEnglish", inEnglish);        List executionPeriodList = (List) ServiceUtils.executeService(userView, "ReadExecutionPeriods",                null);        Object argsDegree[] = { degreeId };        List allSummariesDegree = (List) ServiceUtils.executeService(userView,                "ReadOldIquiriesSummaryByDegreeID", argsDegree);        Iterator periodIter = executionPeriodList.iterator();        while (periodIter.hasNext()) {            InfoExecutionPeriod iep = (InfoExecutionPeriod) periodIter.next();            boolean found = false;            Iterator summaryIter = allSummariesDegree.listIterator();            while (summaryIter.hasNext()) {                InfoOldInquiriesSummary iois = (InfoOldInquiriesSummary) summaryIter.next();                if (iep.getIdInternal() == iois.getKeyExecutionPeriod()) {                    found = true;                    break;                }            }            if (!found) {                periodIter.remove();            }        }        Collections.sort(executionPeriodList, new Comparator() {            public int compare(Object o1, Object o2) {                InfoExecutionPeriod ep1 = (InfoExecutionPeriod) o1;                InfoExecutionPeriod ep2 = (InfoExecutionPeriod) o2;                return ep2.getBeginDate().compareTo(ep1.getBeginDate());            }        });        request.setAttribute("executionPeriodList", executionPeriodList);        // Getting information on the Degree        InfoDegreeCurricularPlan infoDegreeCurricularPlan = getInfoDegreeCurricularPlan(                executionDegreeId, degreeId, degreeCurricularPlanId, mapping, request, errors);        if (!errors.isEmpty()) {            saveErrors(request, errors);            return (new ActionForward(mapping.getInput()));        }        request.setAttribute("infoDegreeCurricularPlan", infoDegreeCurricularPlan);        // Getting the summary information        DynaActionForm degreeEvaluationForm = (DynaActionForm) actionForm;        Integer executionPeriodId = (Integer) degreeEvaluationForm.get("executionPeriodId");        if ((executionPeriodId != null) && (executionPeriodId.intValue() > 0)) {            request.setAttribute("searchExecutionPeriodId", executionPeriodId);            Iterator summaryIter = allSummariesDegree.listIterator();            List oldInquiriesSummaries = new ArrayList();            while (summaryIter.hasNext()) {                InfoOldInquiriesSummary iois = (InfoOldInquiriesSummary) summaryIter.next();                if (iois.getExecutionPeriod().getIdInternal().equals(executionPeriodId)) {                    if ((iois.getNumberEnrollments().intValue() > 0)                            && (iois.getNumberApproved().intValue() >= 0)                            && (iois.getNumberEvaluated().intValue() > 0))                        oldInquiriesSummaries.add(iois);                }            }            if (oldInquiriesSummaries.size() > 0) {                Collections.sort(oldInquiriesSummaries);                request.setAttribute("oldInquiriesSummaries", oldInquiriesSummaries);                int denominatorCourses = 0, denominatorTeachers = 0;                double numeratorCourses = 0, numeratorTeachers = 0;                Iterator iter = oldInquiriesSummaries.iterator();                while (iter.hasNext()) {                    InfoOldInquiriesSummary iois = (InfoOldInquiriesSummary) iter.next();                    if ((iois.getNumberAnswers() != null) && (iois.getNumberAnswers().intValue() > 0)                            && (iois.getNumberEnrollments() != null)                            && (iois.getNumberEnrollments().intValue() > 0)) {                        iois.setRepresentationQuota(new Double(                                (iois.getNumberAnswers().doubleValue() / iois.getNumberEnrollments()                                        .doubleValue()) * 100));                    }                    if ((iois.getAverage2_8() != null) && (iois.getAverage2_8().doubleValue() >= 0)                            && (iois.getRepresentationQuota().doubleValue() > 10)) {                        numeratorCourses += iois.getAverage2_8().doubleValue();                        denominatorCourses++;                    }                    if ((iois.getAverage3_11() != null) && (iois.getAverage3_11().doubleValue() >= 0)                            && (iois.getRepresentationQuota().doubleValue() > 10)) {                        numeratorTeachers += iois.getAverage3_11().doubleValue();                        denominatorTeachers++;                    }                }                if (denominatorCourses > 0) {                    request.setAttribute("averageAppreciationCourses", new Double(numeratorCourses                            / denominatorCourses));                }                if (denominatorTeachers > 0) {                    request.setAttribute("averageAppreciationTeachers", new Double(numeratorTeachers                            / denominatorTeachers));                }            } else {                request.setAttribute("emptyOldInquiriesSummaries", Boolean.TRUE);            }        }        return mapping.findForward("viewDegreeEvaluation");    }