public ActionForward prepareEditEvaluation( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { Enrolment enrolment = getEnrolmentForEdition(request); ExecutionSemester executionSemester = readExecutionSemester(request); StudentCurricularPlan studentCurricularPlan = readStudentCurricularPlan(request); java.util.List<Enrolment> enrolmentToUse = new java.util.ArrayList<Enrolment>(); enrolmentToUse.add(enrolment); java.util.List<java.util.List<MarkSheetEnrolmentEvaluationBean>> enrolmentEvaluationBeanList = new java.util.ArrayList<java.util.List<MarkSheetEnrolmentEvaluationBean>>(); createTreeCurriculumModules( studentCurricularPlan, executionSemester, enrolmentEvaluationBeanList, null, enrolmentToUse, true); request.setAttribute("entriesList", enrolmentEvaluationBeanList); request.setAttribute("allEvaluationsBound", enrolment.getEvaluationsSet()); return mapping.findForward("show-edit-evaluation-form"); }
@Atomic public static void run(final String studentCurricularPlanId) throws DomainException, NonExistingServiceException { final StudentCurricularPlan studentCurricularPlan = FenixFramework.getDomainObject(studentCurricularPlanId); if (studentCurricularPlan != null) { for (Enrolment enrolment : studentCurricularPlan.getEnrolmentsSet()) { for (EnrolmentEvaluation evaluation : enrolment.getEvaluationsSet()) { evaluation.setEnrolmentEvaluationState(EnrolmentEvaluationState.TEMPORARY_OBJ); } } studentCurricularPlan.delete(); } else { throw new NonExistingServiceException(); } }
private void load(final CurriculumModule curriculumModule) { if (curriculumModule != null) { curriculumModule.getCreationDateDateTime(); final DegreeModule degreeModule = curriculumModule.getDegreeModule(); if (degreeModule != null) { degreeModule.getName(); } if (curriculumModule.isCurriculumLine()) { final CurriculumLine curriculumLine = (CurriculumLine) curriculumModule; if (curriculumLine.isEnrolment()) { final Enrolment enrolment = (Enrolment) curriculumLine; for (final EnrolmentEvaluation enrolmentEvaluation : enrolment.getEvaluationsSet()) { enrolmentEvaluation.getGrade(); } } } else { final CurriculumGroup curriculumGroup = (CurriculumGroup) curriculumModule; for (final CurriculumModule child : curriculumGroup.getCurriculumModulesSet()) { load(child); } } } }