Index: lams_tool_forum/conf/xdoclet/struts-actions.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_forum/conf/xdoclet/struts-actions.xml,v
diff -u -r1.40 -r1.41
--- lams_tool_forum/conf/xdoclet/struts-actions.xml 23 Aug 2006 05:42:17 -0000 1.40
+++ lams_tool_forum/conf/xdoclet/struts-actions.xml 28 Aug 2006 07:23:22 -0000 1.41
@@ -53,7 +53,7 @@
scope="request"
validate="false"
parameter="deleteOnlineFile" >
-
+
-
+
Index: lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/util/ForumConstants.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/util/ForumConstants.java,v
diff -u -r1.37 -r1.38
--- lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/util/ForumConstants.java 23 Aug 2006 06:54:01 -0000 1.37
+++ lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/util/ForumConstants.java 28 Aug 2006 07:23:23 -0000 1.38
@@ -87,6 +87,7 @@
public static final String ATTR_TOPIC = "topic";
public static final String ATTR_USER= "user";
public static final String ATTR_REPORT = "report";
+ public static final String ATTR_FILE_TYPE_FLAG = "fileTypeFlag";
public static final String PARAM_UPDATE_MODE = "updateMode";
Index: lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/AuthoringAction.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/AuthoringAction.java,v
diff -u -r1.48 -r1.49
--- lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/AuthoringAction.java 25 Aug 2006 02:37:34 -0000 1.48
+++ lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/AuthoringAction.java 28 Aug 2006 07:23:23 -0000 1.49
@@ -448,20 +448,6 @@
//add to attachmentList
attachmentList.add(att);
- //update Html FORM, this will echo back to web page for display
- List onlineFileList = new ArrayList();
- List offlineFileList = new ArrayList();
- iter = attachmentList.iterator();
- while(iter.hasNext()){
- Attachment attFile = (Attachment) iter.next();
- if(StringUtils.equalsIgnoreCase(attFile.getFileType(),IToolContentHandler.TYPE_OFFLINE))
- offlineFileList.add(attFile);
- else
- onlineFileList.add(attFile);
- }
- forumForm.setOnlineFileList(onlineFileList);
- forumForm.setOfflineFileList(offlineFileList);
-
return mapping.findForward("success");
}
@@ -512,24 +498,18 @@
//first check exist attachment and delete old one (if exist) to deletedAttachmentList
Iterator iter = attachmentList.iterator();
Attachment existAtt;
- List leftAttachments = new ArrayList();
while(iter.hasNext()){
existAtt = (Attachment) iter.next();
if(existAtt.getFileUuid().equals(uuID) && existAtt.getFileVersionId().equals(versionID)){
//if there is same name attachment, delete old one
deleteAttachmentList.add(existAtt);
iter.remove();
- }else if(StringUtils.equals(existAtt.getFileType(),type) ){
- leftAttachments.add(existAtt);
}
}
-
- if(StringUtils.equals(IToolContentHandler.TYPE_OFFLINE,type)){
- request.setAttribute("offlineFileList",leftAttachments);
- }else{
- request.setAttribute("onlineFileList",leftAttachments);
- }
+
+ request.setAttribute(ForumConstants.ATTR_FILE_TYPE_FLAG, type);
+ request.setAttribute(ForumConstants.ATTR_SESSION_MAP_ID, sessionMapID);
return mapping.findForward("success");
}
@@ -900,7 +880,6 @@
//define it later mode(TEACHER) skip below validation.
String modeStr = request.getParameter(AttributeNames.ATTR_MODE);
if(StringUtils.equals(modeStr, ToolAccessMode.TEACHER.toString())){
- mapping.setInput("/defineLater");
return errors;
}
if(!form.getForum().isAllowRichEditor()){
Index: lams_tool_forum/web/WEB-INF/struts-config.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_forum/web/WEB-INF/Attic/struts-config.xml,v
diff -u -r1.45 -r1.46
--- lams_tool_forum/web/WEB-INF/struts-config.xml 23 Aug 2006 05:42:17 -0000 1.45
+++ lams_tool_forum/web/WEB-INF/struts-config.xml 28 Aug 2006 07:23:22 -0000 1.46
@@ -99,15 +99,15 @@
scope="request"
validate="false"
parameter="deleteOnlineFile" >
-
+
-
+
+