diff --git a/YACOSWeb/WebContent/WEB-INF/classes/messages.properties b/YACOSWeb/WebContent/WEB-INF/classes/messages.properties
index 8d40cee..82450c2 100644
--- a/YACOSWeb/WebContent/WEB-INF/classes/messages.properties
+++ b/YACOSWeb/WebContent/WEB-INF/classes/messages.properties
@@ -124,6 +124,8 @@ evaluation.commentAuthor=Comment of author
evaluation.headPage=Here is a report of the evaluation
evaluation.titleArticle=The title of article is
evaluation.note=The note for the criterion
+evaluation.thisArticle=evaluate this article
+evaluation.choose=Choose an title to evaluation from the list
#Validation messages for errors
submissionArticle.title=The title should not be null
@@ -138,3 +140,4 @@ validate.download=download the article
validate.report=consulter the result of the evaluation
validate.validate=validate
validate.reject=reject
+
diff --git a/YACOSWeb/WebContent/WEB-INF/decorators/usermenu.jsp b/YACOSWeb/WebContent/WEB-INF/decorators/usermenu.jsp
index bd866c4..76819a5 100644
--- a/YACOSWeb/WebContent/WEB-INF/decorators/usermenu.jsp
+++ b/YACOSWeb/WebContent/WEB-INF/decorators/usermenu.jsp
@@ -16,7 +16,7 @@
">
">
">
- ">
+ ">
">
">
diff --git a/YACOSWeb/WebContent/WEB-INF/jsp/listEvaluation.jsp b/YACOSWeb/WebContent/WEB-INF/jsp/listEvaluation.jsp
new file mode 100644
index 0000000..5bb4e04
--- /dev/null
+++ b/YACOSWeb/WebContent/WEB-INF/jsp/listEvaluation.jsp
@@ -0,0 +1,21 @@
+<%@ include file="/WEB-INF/decorators/include.jsp"%>
+
+
+
+
+
+
+
+ - Title: ">${article.title}
+ - Author: ${article.mainAuthor.firstName} ${article.mainAuthor.lastName}
+ - Topic: ${article.topic}
+ - ">
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/YACOSWeb/src/org/yacos/web/PCmember/controller/EvaluationController.java b/YACOSWeb/src/org/yacos/web/PCmember/controller/EvaluationController.java
index d4343f9..98c6974 100644
--- a/YACOSWeb/src/org/yacos/web/PCmember/controller/EvaluationController.java
+++ b/YACOSWeb/src/org/yacos/web/PCmember/controller/EvaluationController.java
@@ -25,6 +25,7 @@ import org.yacos.core.users.User;
import org.yacos.web.PCmember.form.FormEvaluation;
import org.yacos.web.PCmember.form.SimpleCriterion;
+import org.yacos.web.system.session.SessionService;
public class EvaluationController extends SimpleFormController {
@@ -87,13 +88,16 @@ public class EvaluationController extends SimpleFormController {
protected ModelAndView onSubmit(HttpServletRequest request,
HttpServletResponse response, Object command, BindException errors)
throws Exception {
-
+ String id=request.getParameter("id");
+ logger.info("my article's id is "+id);
+
+
FormEvaluation fe=(FormEvaluation)command;
List liste=fe.getSimpleRatings();
String commentAuthor=fe.getCommentAuthor();
String commentPCMember=fe.getCommentPCMember();
- ArrayList listeRating=new ArrayList();
+ List listeRating=new ArrayList();
for(SimpleCriterion sc : liste){
@@ -109,17 +113,18 @@ public class EvaluationController extends SimpleFormController {
// Article article=articleManager.getArticle(new Integer(1));
- Article article = new Article();
- article.setTitle("myTitle");
+ Article article =articleManager.getArticle(Integer.parseInt(id));
+
System.out.println("le title est: "+article.getTitle());
- User toto = userManager.getUser("toto");
- if(toto == null){
- toto = userManager.addUser("toto",User.hashPassword("toto"), "Toto", "Toto", "Toto corp.", "toto@totocorp.com");
+ User current = SessionService.getInstance().getCurrentUser();
+ if(current == null){
+ current = userManager.addUser("toto",User.hashPassword("toto"), "Toto", "Toto", "Toto corp.", "toto@totocorp.com");
}
- Report rpt =new Report(commentPCMember,commentAuthor,listeRating,toto,article);
- //evaluationManager.addReport(article, commentPCMember, commentAuthor, listeRating, toto);
- request.getSession().setAttribute("report", rpt);
+ int idd=Integer.parseInt(id);
+ Report rpt =new Report(commentPCMember,commentAuthor,listeRating,current,article);
+ //evaluationManager.addReport(idd, commentPCMember, commentAuthor, listeRating, current.getLogin());
+ request.getSession().setAttribute("report", rpt);
//Map model1 = new HashMap();
//model1.put("report", rpt);
//return new ModelAndView(new RedirectView("createReport.htm"),model1);
diff --git a/YACOSWeb/src/org/yacos/web/PCmember/controller/ListEvaluationController.java b/YACOSWeb/src/org/yacos/web/PCmember/controller/ListEvaluationController.java
new file mode 100644
index 0000000..feb7aa7
--- /dev/null
+++ b/YACOSWeb/src/org/yacos/web/PCmember/controller/ListEvaluationController.java
@@ -0,0 +1,48 @@
+package org.yacos.web.PCmember.controller;
+
+import org.springframework.web.servlet.mvc.SimpleFormController;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import java.io.IOException;
+import java.util.List;
+import org.yacos.web.system.controller.NoConferenceSelectedException;
+import org.yacos.web.system.session.SessionService;
+import org.yacos.core.article.Article;
+import org.yacos.core.article.IArticleManager;
+import org.yacos.core.exceptions.ConferenceDoesntExistException;
+
+public class ListEvaluationController extends SimpleFormController {
+
+ protected final Log logger = LogFactory.getLog(getClass());
+
+ private IArticleManager articleManager;
+
+ public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response)
+ throws ServletException, IOException, NoConferenceSelectedException {
+
+ logger.info("Returning listArticle view");
+
+ List listArticle;
+ try {
+ listArticle = articleManager.getArticles(SessionService.getInstance().getCurrentConferenceId());
+ getServletContext().setAttribute("listArticle", listArticle);
+ } catch (ConferenceDoesntExistException e) {
+ logger.error(e.getMessage());
+ }
+
+ return new ModelAndView("listEvaluation");
+ }
+
+ public IArticleManager getArticleManager() {
+ return articleManager;
+ }
+
+ public void setArticleManager(IArticleManager articleManager) {
+ this.articleManager = articleManager;
+ }
+}
\ No newline at end of file