diff --git a/YACOSWeb/WebContent/WEB-INF/jsp/listEvaluation.jsp b/YACOSWeb/WebContent/WEB-INF/jsp/listEvaluation.jsp index 661748c..68420d3 100644 --- a/YACOSWeb/WebContent/WEB-INF/jsp/listEvaluation.jsp +++ b/YACOSWeb/WebContent/WEB-INF/jsp/listEvaluation.jsp @@ -1,7 +1,19 @@ <%@ include file="/WEB-INF/decorators/include.jsp"%> - + + + + +

@@ -50,7 +62,8 @@ - + + Remove your evaluationDelete
">Modify the evaluation Click to modify evaluation
diff --git a/YACOSWeb/WebContent/WEB-INF/yacos-servlet.xml b/YACOSWeb/WebContent/WEB-INF/yacos-servlet.xml index e5f7e50..69212e7 100644 --- a/YACOSWeb/WebContent/WEB-INF/yacos-servlet.xml +++ b/YACOSWeb/WebContent/WEB-INF/yacos-servlet.xml @@ -42,7 +42,8 @@ LogonController ListEvaluationController ArticleDownloadController - ArticleDeleteController + ArticleDeleteController + EvaluationRemoveController ListReportController ListReportAuthorController ForgotPasswordController @@ -116,6 +117,11 @@ + + + + + listRating = evaluationManager.getRatingForReport(rpt.getId()); + + for (Rating rt : listRating) { + evaluationManager.removeRating(rt.getCriterion(), rpt); + } + + evaluationManager.removeReport(rpt.getId()); + + } + catch(NumberFormatException e) { + throw new ModelAndViewDefiningException(new ModelAndView("404error")); + } + + // TODO : mettre le bon lien ici + return new ModelAndView(new RedirectView("listEvaluation.htm")); + } + +} \ No newline at end of file diff --git a/YACOSWeb/src/org/yacos/web/PCmember/controller/ListEvaluationController.java b/YACOSWeb/src/org/yacos/web/PCmember/controller/ListEvaluationController.java index 838c653..afd4010 100644 --- a/YACOSWeb/src/org/yacos/web/PCmember/controller/ListEvaluationController.java +++ b/YACOSWeb/src/org/yacos/web/PCmember/controller/ListEvaluationController.java @@ -70,6 +70,8 @@ public class ListEvaluationController extends SimpleFormController { List listArticleBean = new ArrayList(); String person = request.getParameter("role"); + if (person == null || person.equals("")) + throw new ModelAndViewDefiningException(new ModelAndView("404error")); // TODO : renvoyer un truc s'il n'a pas le role