Index: lams_tool_sbmt/.classpath
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_sbmt/.classpath,v
diff -u -r1.13 -r1.14
--- lams_tool_sbmt/.classpath 7 Nov 2005 01:09:16 -0000 1.13
+++ lams_tool_sbmt/.classpath 12 May 2006 06:34:09 -0000 1.14
@@ -8,5 +8,6 @@
+
Index: lams_tool_sbmt/build.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_sbmt/build.xml,v
diff -u -r1.31 -r1.32
--- lams_tool_sbmt/build.xml 14 Apr 2006 10:05:53 -0000 1.31
+++ lams_tool_sbmt/build.xml 12 May 2006 06:34:09 -0000 1.32
@@ -174,7 +174,7 @@
-
@@ -184,7 +184,7 @@
-
+
Index: lams_tool_sbmt/conf/language/ApplicationResources.properties
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_sbmt/conf/language/Attic/ApplicationResources.properties,v
diff -u -r1.3 -r1.4
--- lams_tool_sbmt/conf/language/ApplicationResources.properties 14 Apr 2006 10:05:53 -0000 1.3
+++ lams_tool_sbmt/conf/language/ApplicationResources.properties 12 May 2006 06:34:09 -0000 1.4
@@ -98,3 +98,6 @@
#======= End labels: Exported 89 labels for en AU =====
+
+#======== New label since 12/05/2006 =========
+authoring.msg.cancel.save=Do you want to close this window without saving?
\ No newline at end of file
Index: lams_tool_sbmt/conf/xdoclet/struts-actions.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_sbmt/conf/xdoclet/struts-actions.xml,v
diff -u -r1.1 -r1.2
--- lams_tool_sbmt/conf/xdoclet/struts-actions.xml 9 Dec 2005 05:05:24 -0000 1.1
+++ lams_tool_sbmt/conf/xdoclet/struts-actions.xml 12 May 2006 06:34:09 -0000 1.2
@@ -17,3 +17,7 @@
/>
+
+
+
\ No newline at end of file
Index: lams_tool_sbmt/src/java/org/lamsfoundation/lams/tool/sbmt/web/AuthoringAction.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_sbmt/src/java/org/lamsfoundation/lams/tool/sbmt/web/AuthoringAction.java,v
diff -u -r1.18 -r1.19
--- lams_tool_sbmt/src/java/org/lamsfoundation/lams/tool/sbmt/web/AuthoringAction.java 6 Apr 2006 06:41:33 -0000 1.18
+++ lams_tool_sbmt/src/java/org/lamsfoundation/lams/tool/sbmt/web/AuthoringAction.java 12 May 2006 06:34:09 -0000 1.19
@@ -44,6 +44,7 @@
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.DynaActionForm;
import org.apache.struts.upload.FormFile;
+import org.lamsfoundation.lams.authoring.web.AuthoringConstants;
import org.lamsfoundation.lams.contentrepository.client.IToolContentHandler;
import org.lamsfoundation.lams.tool.sbmt.InstructionFiles;
import org.lamsfoundation.lams.tool.sbmt.SubmitFilesContent;
@@ -151,6 +152,8 @@
} catch (Exception e) {
log.error(e);
}
+
+ request.setAttribute(AuthoringConstants.LAMS_AUTHORING_SUCCESS_FLAG,Boolean.TRUE);
return mapping.findForward("success");
}
/**
@@ -246,7 +249,7 @@
HttpServletRequest request, HttpServletResponse response) {
Long contentID = new Long(WebUtil.readLongParam(request,AttributeNames.PARAM_TOOL_CONTENT_ID));
-
+ request.getSession().setAttribute(AttributeNames.PARAM_TOOL_CONTENT_ID,contentID);
//get back the upload file list and display them on page
submitFilesService = SubmitFilesServiceProxy.getSubmitFilesService(this
.getServlet().getServletContext());
Index: lams_tool_sbmt/src/java/org/lamsfoundation/lams/tool/sbmt/web/ClearSessionAction.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_sbmt/src/java/org/lamsfoundation/lams/tool/sbmt/web/ClearSessionAction.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_sbmt/src/java/org/lamsfoundation/lams/tool/sbmt/web/ClearSessionAction.java 12 May 2006 06:34:09 -0000 1.1
@@ -0,0 +1,52 @@
+/****************************************************************
+ * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org)
+ * =============================================================
+ * License Information: http://lamsfoundation.org/licensing/lams/2.0/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2.0
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ *
+ * http://www.gnu.org/licenses/gpl.txt
+ * ****************************************************************
+ */
+
+/* $Id$ */
+package org.lamsfoundation.lams.tool.sbmt.web;
+
+import javax.servlet.http.HttpSession;
+
+import org.lamsfoundation.lams.authoring.web.LamsAuthoringFinishAction;
+import org.lamsfoundation.lams.tool.ToolAccessMode;
+import org.lamsfoundation.lams.tool.sbmt.util.SbmtConstants;
+import org.lamsfoundation.lams.web.util.AttributeNames;
+
+/**
+ * This class give a chance to clear HttpSession when user save/close authoring page.
+ * @author Steve.Ni
+ *
+ * @version $Revision$
+ */
+public class ClearSessionAction extends LamsAuthoringFinishAction {
+
+ @Override
+ public void clearSession(HttpSession session, ToolAccessMode mode) {
+ if(mode.isAuthor()){
+ session.removeAttribute(AttributeNames.PARAM_TOOL_CONTENT_ID);
+ session.removeAttribute(SbmtConstants.ATTACHMENT_LIST);
+ session.removeAttribute(SbmtConstants.DELETED_ATTACHMENT_LIST);
+ }
+ }
+
+
+}
Index: lams_tool_sbmt/web/WEB-INF/lams.tld
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_sbmt/web/WEB-INF/Attic/lams.tld,v
diff -u -r1.5 -r1.6
--- lams_tool_sbmt/web/WEB-INF/lams.tld 19 Apr 2006 02:24:22 -0000 1.5
+++ lams_tool_sbmt/web/WEB-INF/lams.tld 12 May 2006 06:34:09 -0000 1.6
@@ -275,7 +275,11 @@
/WEB-INF/tags/SetEditor.tag
+ AuthoringButton
+ /WEB-INF/tags/AuthoringButton.tag
+
+
headItems
/WEB-INF/tags/headItems.tag
-
+
Index: lams_tool_sbmt/web/WEB-INF/web.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_sbmt/web/WEB-INF/Attic/web.xml,v
diff -u -r1.16 -r1.17
--- lams_tool_sbmt/web/WEB-INF/web.xml 14 Apr 2006 06:33:12 -0000 1.16
+++ lams_tool_sbmt/web/WEB-INF/web.xml 12 May 2006 06:34:09 -0000 1.17
@@ -248,6 +248,7 @@
STAFF
+ TEACHER
@@ -278,6 +279,7 @@
AUTHOR
STAFF
+ TEACHER
ADMIN
SYSADMIN
Index: lams_tool_sbmt/web/WEB-INF/struts/struts-config.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_sbmt/web/WEB-INF/struts/Attic/struts-config.xml,v
diff -u -r1.26 -r1.27
--- lams_tool_sbmt/web/WEB-INF/struts/struts-config.xml 10 Apr 2006 11:11:07 -0000 1.26
+++ lams_tool_sbmt/web/WEB-INF/struts/struts-config.xml 12 May 2006 06:34:09 -0000 1.27
@@ -211,6 +211,10 @@
/>
+
+
+
Index: lams_tool_sbmt/web/WEB-INF/tags/AuthoringButton.tag
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_sbmt/web/WEB-INF/tags/AuthoringButton.tag,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_sbmt/web/WEB-INF/tags/AuthoringButton.tag 12 May 2006 06:34:09 -0000 1.1
@@ -0,0 +1,90 @@
+<%
+/****************************************************************
+ * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org)
+ * =============================================================
+ * License Information: http://lamsfoundation.org/licensing/lams/2.0/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2.0
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ *
+ * http://www.gnu.org/licenses/gpl.txt
+ * ****************************************************************
+ */
+
+ /**
+ * AuthoringButton.tag
+ * Author: Dapeng Ni
+ * Description: Creates the save/cancel button for authoring page
+ */
+
+ %>
+<%@ tag body-content="scriptless" %>
+<%@ taglib uri="tags-core" prefix="c" %>
+<%@ taglib uri="tags-fmt" prefix="fmt" %>
+<%@ taglib uri="tags-html" prefix="html" %>
+
+<%@ attribute name="formID" required="true" rtexprvalue="true" %>
+<%@ attribute name="toolSignature" required="true" rtexprvalue="true" %>
+<%@ attribute name="toolContentID" required="true" rtexprvalue="true" %>
+<%@ attribute name="clearSessionActionUrl" required="true" rtexprvalue="true" %>
+
+<%-- Optional attribute --%>
+<%@ attribute name="accessMode" required="false" rtexprvalue="true" %>
+<%@ attribute name="cancelButtonLabelKey" required="false" rtexprvalue="true" %>
+<%@ attribute name="saveButtonLabelKey" required="false" rtexprvalue="true" %>
+<%@ attribute name="cancelConfirmMsgKey" required="false" rtexprvalue="true" %>
+
+<%-- Default value for message key --%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
Index: lams_tool_sbmt/web/authoring/authoring.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_sbmt/web/authoring/authoring.jsp,v
diff -u -r1.27 -r1.28
--- lams_tool_sbmt/web/authoring/authoring.jsp 19 Apr 2006 02:25:28 -0000 1.27
+++ lams_tool_sbmt/web/authoring/authoring.jsp 12 May 2006 06:34:09 -0000 1.28
@@ -65,10 +65,10 @@
+ focus="title" styleId="authoringForm" enctype="multipart/form-data">
-
+
@@ -100,15 +100,14 @@
-
-
-
-
-
-
-
-
+<%-- Default value
+ cancelButtonLabelKey="label.authoring.cancel.button"
+ saveButtonLabelKey="label.authoring.save.button"
+ cancelConfirmMsgKey="authoring.msg.cancel.save"
+ accessMode="author"
+ --%>
+
+