Index: lams_tool_forum/web/WEB-INF/classes/ApplicationResources.properties
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_forum/web/WEB-INF/classes/Attic/ApplicationResources.properties,v
diff -u -r1.1 -r1.2
--- lams_tool_forum/web/WEB-INF/classes/ApplicationResources.properties 29 Jun 2005 06:37:55 -0000 1.1
+++ lams_tool_forum/web/WEB-INF/classes/ApplicationResources.properties 1 Jul 2005 07:25:34 -0000 1.2
@@ -57,5 +57,6 @@
button.upload = upload
button.done = done
button.submit = submit
+button.on = On
+button.off = Off
-
Index: lams_tool_forum/web/WEB-INF/classes/org/lamsfoundation/lams/tool/forum/actions/ForumAction.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_forum/web/WEB-INF/classes/org/lamsfoundation/lams/tool/forum/actions/Attic/ForumAction.java,v
diff -u -r1.1 -r1.2
--- lams_tool_forum/web/WEB-INF/classes/org/lamsfoundation/lams/tool/forum/actions/ForumAction.java 29 Jun 2005 06:37:08 -0000 1.1
+++ lams_tool_forum/web/WEB-INF/classes/org/lamsfoundation/lams/tool/forum/actions/ForumAction.java 1 Jul 2005 07:25:34 -0000 1.2
@@ -2,7 +2,6 @@
import org.apache.log4j.Logger;
import org.apache.struts.action.*;
-import org.apache.struts.upload.FormFile;
import org.lamsfoundation.lams.tool.forum.core.GenericObjectFactoryImpl;
import org.lamsfoundation.lams.tool.forum.core.PersistenceException;
import org.lamsfoundation.lams.tool.forum.persistence.Forum;
@@ -11,14 +10,11 @@
import org.lamsfoundation.lams.tool.forum.service.ForumManager;
import org.lamsfoundation.lams.tool.forum.forms.ForumForm;
import org.lamsfoundation.lams.tool.forum.forms.MessageForm;
-import org.lamsfoundation.lams.tool.forum.util.ForumConstants;
-import org.lamsfoundation.lams.tool.forum.util.FileUtils;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
-import java.io.File;
import java.util.*;
/**
@@ -78,100 +74,103 @@
HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException, Exception {
- ForumForm forumForm = (ForumForm) form;
- Forum forum = forumForm.getForum();
- Map topics = (Map) request.getSession().getAttribute("topics");
- forum = this.forumManager.createForum(forum, forumForm.getAttachments(), topics);
- forumForm.setForum(forum);
+ ForumForm forumForm = (ForumForm) form;
+ Forum forum = forumForm.getForum();
- //populate topics with new topics
- List topicList = this.forumManager.getTopics(forum.getId());
- topics = new HashMap();
- Iterator it = topicList.iterator();
- while (it.hasNext()) {
- Message message = (Message) it.next();
- topics.put(message.getSubject(), message);
- }
+ Map topics = (Map) request.getSession().getAttribute("topics");
+ forum = this.forumManager.createForum(forum, forumForm.getAttachments(), topics);
+ forumForm.setForum(forum);
- request.getSession().setAttribute("topics", topics);
- request.getSession().setAttribute("topicList", topicList);
- return mapping.findForward("success");
+ //populate topics with new topics
+ List topicList = this.forumManager.getTopics(forum.getId());
+ topics = new HashMap();
+ Iterator it = topicList.iterator();
+ while (it.hasNext()) {
+ Message message = (Message) it.next();
+ topics.put(message.getSubject(), message);
+ }
+
+ request.getSession().setAttribute("topics", topics);
+ request.getSession().setAttribute("topicList", topicList);
+ return mapping.findForward("success");
}
public ActionForward editForum(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException, Exception {
- ForumForm forumForm = (ForumForm) form;
- Forum forum = forumForm.getForum();
- Map topics = (Map) request.getSession().getAttribute("topics");
- this.forumManager.editForum(forum, forumForm.getAttachments(), topics);
- return mapping.findForward("success");
+ ForumForm forumForm = (ForumForm) form;
+ Forum forum = forumForm.getForum();
+
+ Map topics = (Map) request.getSession().getAttribute("topics");
+ this.forumManager.editForum(forum, forumForm.getAttachments(), topics);
+ return mapping.findForward("success");
}
public ActionForward getForum(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException, Exception {
- Long forumId = new Long((String) request.getParameter("forumId"));
- Forum forum = forumManager.getForum(forumId);
- List topicList = this.forumManager.getTopics(forum.getId());
- ForumForm forumForm = new ForumForm();
- forumForm.setForum(forum);
- request.getSession().setAttribute("forum", forumForm);
+ Long forumId = new Long((String) request.getParameter("forumId"));
+ Forum forum = forumManager.getForum(forumId);
+ List topicList = this.forumManager.getTopics(forum.getId());
+ ForumForm forumForm = new ForumForm();
- Map topics = new HashMap();
- Iterator it = topicList.iterator();
- while (it.hasNext()) {
- Message message = (Message) it.next();
- topics.put(message.getSubject(), message);
- }
+ forumForm.setForum(forum);
+ request.getSession().setAttribute("forum", forumForm);
- request.getSession().setAttribute("topics", topics);
- request.getSession().setAttribute("topicList", topicList);
- return mapping.findForward("success");
+ Map topics = new HashMap();
+ Iterator it = topicList.iterator();
+ while (it.hasNext()) {
+ Message message = (Message) it.next();
+ topics.put(message.getSubject(), message);
+ }
+
+ request.getSession().setAttribute("topics", topics);
+ request.getSession().setAttribute("topicList", topicList);
+ return mapping.findForward("success");
}
public ActionForward deleteForum(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException, Exception {
- Long forumId = new Long((String) request.getParameter("forumId"));
- forumManager.deleteForum(forumId);
- return (mapping.findForward("success"));
+ Long forumId = new Long((String) request.getParameter("forumId"));
+ forumManager.deleteForum(forumId);
+ return (mapping.findForward("success"));
}
public ActionForward createTopic(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException, PersistenceException {
- MessageForm messageForm = (MessageForm) form;
- Message message = messageForm.getMessage();
- Map topics = (Map) request.getSession().getAttribute("topics");
- if (topics == null) {
- topics = new HashMap();
- }
- topics.put(message.getSubject(), message);
- request.getSession().setAttribute("topics", topics);
- request.getSession().setAttribute("topicList", new ArrayList(topics.values()));
- return mapping.findForward("success");
- }
+ MessageForm messageForm = (MessageForm) form;
+ Message message = messageForm.getMessage();
+ Map topics = (Map) request.getSession().getAttribute("topics");
+ if (topics == null) {
+ topics = new HashMap();
+ }
+ topics.put(message.getSubject(), message);
+ request.getSession().setAttribute("topics", topics);
+ request.getSession().setAttribute("topicList", new ArrayList(topics.values()));
+ return mapping.findForward("success");
+ }
- public ActionForward saveInstructions(ActionMapping mapping,
+ public ActionForward saveInstructions(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException, PersistenceException {
- ForumForm forumForm = (ForumForm) form;
- Collection entries = forumForm.getAttachments().values();
- List attachmentList = new ArrayList(entries);
- request.getSession().setAttribute("attachmentList", attachmentList);
- return mapping.findForward("success");
- }
+ ForumForm forumForm = (ForumForm) form;
+ Collection entries = forumForm.getAttachments().values();
+ List attachmentList = new ArrayList(entries);
+ request.getSession().setAttribute("attachmentList", attachmentList);
+ return mapping.findForward("success");
+ }
public ActionForward deleteAttachment(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws PersistenceException {
ActionForward forward = new ActionForward();
Index: lams_tool_forum/web/WEB-INF/classes/org/lamsfoundation/lams/tool/forum/forms/ForumForm.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_forum/web/WEB-INF/classes/org/lamsfoundation/lams/tool/forum/forms/Attic/ForumForm.java,v
diff -u -r1.1 -r1.2
--- lams_tool_forum/web/WEB-INF/classes/org/lamsfoundation/lams/tool/forum/forms/ForumForm.java 29 Jun 2005 06:37:08 -0000 1.1
+++ lams_tool_forum/web/WEB-INF/classes/org/lamsfoundation/lams/tool/forum/forms/ForumForm.java 1 Jul 2005 07:25:34 -0000 1.2
@@ -29,6 +29,11 @@
private FormFile offlineFile;
private FormFile onlineFile;
protected Map attachments;
+ protected boolean lockWhenFinished;
+ protected boolean forceOffline;
+ protected boolean allowAnnomity;
+
+
private static Logger logger = Logger.getLogger(ForumForm.class.getName());
public ForumForm() {
@@ -61,6 +66,30 @@
return offlineFile;
}
+ public boolean getAllowAnnomity() {
+ return allowAnnomity;
+ }
+
+ public void setAllowAnnomity(boolean allowAnnomity) {
+ this.allowAnnomity = allowAnnomity;
+ }
+
+ public boolean getLockWhenFinished() {
+ return lockWhenFinished;
+ }
+
+ public void setLockWhenFinished(boolean lockWhenFinished) {
+ this.lockWhenFinished = lockWhenFinished;
+ }
+
+ public boolean getForceOffline() {
+ return forceOffline;
+ }
+
+ public void setForceOffline(boolean forceOffline) {
+ this.forceOffline = forceOffline;
+ }
+
public void setAttachments(Map attachments) {
this.attachments = attachments;
}
Index: lams_tool_forum/web/WEB-INF/jsps/authoring/forum/advanced.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_forum/web/WEB-INF/jsps/authoring/forum/Attic/advanced.jsp,v
diff -u -r1.1 -r1.2
--- lams_tool_forum/web/WEB-INF/jsps/authoring/forum/advanced.jsp 29 Jun 2005 06:39:22 -0000 1.1
+++ lams_tool_forum/web/WEB-INF/jsps/authoring/forum/advanced.jsp 1 Jul 2005 07:25:34 -0000 1.2
@@ -2,7 +2,7 @@
<%@ include file="/includes/messages.jsp" %>
|
+ |
+ |
|||
|
+ |
+ |
|||
|
+ |
+ |
|||
|
Index: lams_tool_forum/web/WEB-INF/jsps/authoring/forum/includes/basic.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_forum/web/WEB-INF/jsps/authoring/forum/includes/Attic/basic.jsp,v
diff -u -r1.1 -r1.2
--- lams_tool_forum/web/WEB-INF/jsps/authoring/forum/includes/basic.jsp 29 Jun 2005 06:39:22 -0000 1.1
+++ lams_tool_forum/web/WEB-INF/jsps/authoring/forum/includes/basic.jsp 1 Jul 2005 07:25:34 -0000 1.2
@@ -6,7 +6,16 @@
|||||
|
+
+ <%-- |
+
+ --%>
+ ||||
|
Index: lams_tool_forum/web/struts/config/struts-actions.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_forum/web/struts/config/Attic/struts-actions.xml,v
diff -u -r1.1 -r1.2
--- lams_tool_forum/web/struts/config/struts-actions.xml 29 Jun 2005 06:42:35 -0000 1.1
+++ lams_tool_forum/web/struts/config/struts-actions.xml 1 Jul 2005 07:25:34 -0000 1.2
@@ -40,7 +40,6 @@
|