Index: lams_tool_forum/web/WEB-INF/classes/ApplicationResources.properties
===================================================================
diff -u -r5ff43288021ceadb26b775d367adae4ceed5eaf8 -rdb911c3802e8b764988d3e9cc741583085d73273
--- lams_tool_forum/web/WEB-INF/classes/ApplicationResources.properties (.../ApplicationResources.properties) (revision 5ff43288021ceadb26b775d367adae4ceed5eaf8)
+++ lams_tool_forum/web/WEB-INF/classes/ApplicationResources.properties (.../ApplicationResources.properties) (revision db911c3802e8b764988d3e9cc741583085d73273)
@@ -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
===================================================================
diff -u -rda429cada8bdb32348ca0f8b7ab64ec755f63c8f -rdb911c3802e8b764988d3e9cc741583085d73273
--- lams_tool_forum/web/WEB-INF/classes/org/lamsfoundation/lams/tool/forum/actions/ForumAction.java (.../ForumAction.java) (revision da429cada8bdb32348ca0f8b7ab64ec755f63c8f)
+++ lams_tool_forum/web/WEB-INF/classes/org/lamsfoundation/lams/tool/forum/actions/ForumAction.java (.../ForumAction.java) (revision db911c3802e8b764988d3e9cc741583085d73273)
@@ -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
===================================================================
diff -u -rda429cada8bdb32348ca0f8b7ab64ec755f63c8f -rdb911c3802e8b764988d3e9cc741583085d73273
--- lams_tool_forum/web/WEB-INF/classes/org/lamsfoundation/lams/tool/forum/forms/ForumForm.java (.../ForumForm.java) (revision da429cada8bdb32348ca0f8b7ab64ec755f63c8f)
+++ lams_tool_forum/web/WEB-INF/classes/org/lamsfoundation/lams/tool/forum/forms/ForumForm.java (.../ForumForm.java) (revision db911c3802e8b764988d3e9cc741583085d73273)
@@ -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
===================================================================
diff -u -r282fd2069a1e0bf88219274af0604853c8763d69 -rdb911c3802e8b764988d3e9cc741583085d73273
--- lams_tool_forum/web/WEB-INF/jsps/authoring/forum/advanced.jsp (.../advanced.jsp) (revision 282fd2069a1e0bf88219274af0604853c8763d69)
+++ lams_tool_forum/web/WEB-INF/jsps/authoring/forum/advanced.jsp (.../advanced.jsp) (revision db911c3802e8b764988d3e9cc741583085d73273)
@@ -2,7 +2,7 @@
<%@ include file="/includes/messages.jsp" %>
|
+ |
+ |
|||
|
+ |
+ |
|||
|
+ |
+ |
|||
|
Index: lams_tool_forum/web/WEB-INF/jsps/authoring/forum/includes/basic.jsp
===================================================================
diff -u -r282fd2069a1e0bf88219274af0604853c8763d69 -rdb911c3802e8b764988d3e9cc741583085d73273
--- lams_tool_forum/web/WEB-INF/jsps/authoring/forum/includes/basic.jsp (.../basic.jsp) (revision 282fd2069a1e0bf88219274af0604853c8763d69)
+++ lams_tool_forum/web/WEB-INF/jsps/authoring/forum/includes/basic.jsp (.../basic.jsp) (revision db911c3802e8b764988d3e9cc741583085d73273)
@@ -6,7 +6,16 @@
|||||
|
+
+ <%-- |
+
+ --%>
+ ||||
|
Index: lams_tool_forum/web/struts/config/struts-actions.xml
===================================================================
diff -u -r4a158f66d55bcd6d74879daf30d902f2a402f79c -rdb911c3802e8b764988d3e9cc741583085d73273
--- lams_tool_forum/web/struts/config/struts-actions.xml (.../struts-actions.xml) (revision 4a158f66d55bcd6d74879daf30d902f2a402f79c)
+++ lams_tool_forum/web/struts/config/struts-actions.xml (.../struts-actions.xml) (revision db911c3802e8b764988d3e9cc741583085d73273)
@@ -40,7 +40,6 @@
|