Index: lams_tool_laqa/.classpath
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_laqa/.classpath,v
diff -u -r1.7 -r1.8
--- lams_tool_laqa/.classpath 23 Feb 2006 19:33:20 -0000 1.7
+++ lams_tool_laqa/.classpath 16 May 2006 01:20:20 -0000 1.8
@@ -8,5 +8,6 @@
+
-
\ No newline at end of file
+
Index: lams_tool_laqa/conf/language/ApplicationResources.properties
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_laqa/conf/language/Attic/ApplicationResources.properties,v
diff -u -r1.3 -r1.4
--- lams_tool_laqa/conf/language/ApplicationResources.properties 14 Apr 2006 10:05:18 -0000 1.3
+++ lams_tool_laqa/conf/language/ApplicationResources.properties 16 May 2006 01:20:20 -0000 1.4
@@ -169,3 +169,6 @@
#======= End labels: Exported 160 labels for en AU =====
+
+#======= Add on 16/05/2006 =====
+authoring.msg.cancel.save=Do you want to close this window without saving?
\ No newline at end of file
Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/ClearSessionAction.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/ClearSessionAction.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/ClearSessionAction.java 16 May 2006 01:20:20 -0000 1.1
@@ -0,0 +1,69 @@
+/****************************************************************
+ * 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.qa.web;
+
+import javax.servlet.http.HttpSession;
+
+import org.lamsfoundation.lams.authoring.web.LamsAuthoringFinishAction;
+import org.lamsfoundation.lams.tool.ToolAccessMode;
+import org.lamsfoundation.lams.web.util.AttributeNames;
+
+/**
+ * This class give a chance to clear HttpSession when user save/close authoring page.
+ * @author Steve.Ni
+ * ----------------XDoclet Tags--------------------
+ *
+ * @struts:action path="/clearsession" validate="false"
+ *
+ * @version $Revision$
+ */
+public class ClearSessionAction extends LamsAuthoringFinishAction {
+
+ @Override
+ public void clearSession(HttpSession session, ToolAccessMode mode) {
+ if(mode.isAuthor()){
+ session.removeAttribute(QaAction.SUBMIT_SUCCESS);
+ session.removeAttribute(QaAction.TOOL_SERVICE);
+ session.removeAttribute(QaAction.MAP_QUESTION_CONTENT);
+ session.removeAttribute(QaAction.EDITACTIVITY_EDITMODE);
+ session.removeAttribute(QaAction.RENDER_MONITORING_EDITACTIVITY);
+ session.removeAttribute(QaAction.ATTACHMENT_LIST);
+ session.removeAttribute(QaAction.DELETED_ATTACHMENT_LIST);
+ session.removeAttribute(QaAction.USER_EXCEPTION_QUESTIONS_DUPLICATE);
+ session.removeAttribute(QaAction.ACTIVITY_TITLE);
+ session.removeAttribute(QaAction.ACTIVITY_INSTRUCTIONS);
+ session.removeAttribute(AttributeNames.PARAM_TOOL_CONTENT_ID);
+ session.removeAttribute(QaAction.DEFINE_LATER_IN_EDIT_MODE);
+ session.removeAttribute(QaAction.TARGET_MODE);
+ session.removeAttribute(QaAction.REQUESTED_MODULE);
+ session.removeAttribute(QaAction.ACTIVE_MODULE);
+ session.removeAttribute(QaAction.IS_DEFINE_LATER);
+ session.removeAttribute(QaAction.SHOW_AUTHORING_TABS);
+ session.removeAttribute("queIndex");
+ }
+ }
+
+
+}
Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaAction.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaAction.java,v
diff -u -r1.8 -r1.9
--- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaAction.java 7 Apr 2006 00:44:22 -0000 1.8
+++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaAction.java 16 May 2006 01:20:20 -0000 1.9
@@ -43,6 +43,7 @@
import org.apache.struts.action.ActionMessage;
import org.apache.struts.action.ActionMessages;
import org.apache.struts.upload.FormFile;
+import org.lamsfoundation.lams.authoring.web.AuthoringConstants;
import org.lamsfoundation.lams.contentrepository.NodeKey;
import org.lamsfoundation.lams.contentrepository.RepositoryCheckedException;
import org.lamsfoundation.lams.contentrepository.client.IToolContentHandler;
@@ -279,6 +280,8 @@
logger.debug("define later set to false");
qaAuthoringForm.resetUserAction();
+
+ request.setAttribute(AuthoringConstants.LAMS_AUTHORING_SUCCESS_FLAG,Boolean.TRUE);
return mapping.findForward(LOAD_QUESTIONS);
}
Index: lams_tool_laqa/test/web/WEB-INF/struts-config.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_laqa/test/web/WEB-INF/Attic/struts-config.xml,v
diff -u -r1.7 -r1.8
--- lams_tool_laqa/test/web/WEB-INF/struts-config.xml 23 Feb 2006 20:43:40 -0000 1.7
+++ lams_tool_laqa/test/web/WEB-INF/struts-config.xml 16 May 2006 01:20:20 -0000 1.8
@@ -205,7 +205,9 @@
/>
-
+
+
Index: lams_tool_laqa/web/WEB-INF/lams.tld
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_laqa/web/WEB-INF/Attic/lams.tld,v
diff -u -r1.8 -r1.9
--- lams_tool_laqa/web/WEB-INF/lams.tld 19 Apr 2006 02:23:49 -0000 1.8
+++ lams_tool_laqa/web/WEB-INF/lams.tld 16 May 2006 01:20:20 -0000 1.9
@@ -275,7 +275,12 @@
/WEB-INF/tags/SetEditor.tag
+ AuthoringButton
+ /WEB-INF/tags/AuthoringButton.tag
+
+
headItems
/WEB-INF/tags/headItems.tag
-
+
+
Index: lams_tool_laqa/web/WEB-INF/struts-config.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_laqa/web/WEB-INF/struts-config.xml,v
diff -u -r1.26 -r1.27
--- lams_tool_laqa/web/WEB-INF/struts-config.xml 10 Apr 2006 11:10:45 -0000 1.26
+++ lams_tool_laqa/web/WEB-INF/struts-config.xml 16 May 2006 01:20:20 -0000 1.27
@@ -482,6 +482,9 @@
redirect="false"
/>
+
+
Index: lams_tool_laqa/web/WEB-INF/web.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_laqa/web/WEB-INF/web.xml,v
diff -u -r1.20 -r1.21
--- lams_tool_laqa/web/WEB-INF/web.xml 14 Apr 2006 06:18:54 -0000 1.20
+++ lams_tool_laqa/web/WEB-INF/web.xml 16 May 2006 01:20:20 -0000 1.21
@@ -4,7 +4,7 @@
javax.servlet.jsp.jstl.fmt.localizationContext
- org.lamsfoundation.lams.tool.qa.web.ApplicationResources
+ org.lamsfoundation.lams.tool.qa.ApplicationResources
Index: lams_tool_laqa/web/WEB-INF/tags/AuthoringButton.tag
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_laqa/web/WEB-INF/tags/AuthoringButton.tag,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_laqa/web/WEB-INF/tags/AuthoringButton.tag 16 May 2006 01:20:20 -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_laqa/web/authoring/AuthoringTabsHolder.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_laqa/web/authoring/AuthoringTabsHolder.jsp,v
diff -u -r1.9 -r1.10
--- lams_tool_laqa/web/authoring/AuthoringTabsHolder.jsp 19 Apr 2006 02:26:45 -0000 1.9
+++ lams_tool_laqa/web/authoring/AuthoringTabsHolder.jsp 16 May 2006 01:20:20 -0000 1.10
@@ -104,8 +104,8 @@
-
-
+
+
@@ -125,6 +125,11 @@
+
+
+
+
@@ -145,6 +150,9 @@
+
+
Index: lams_tool_laqa/web/authoring/BasicContent.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_laqa/web/authoring/BasicContent.jsp,v
diff -u -r1.13 -r1.14
--- lams_tool_laqa/web/authoring/BasicContent.jsp 7 Apr 2006 00:44:23 -0000 1.13
+++ lams_tool_laqa/web/authoring/BasicContent.jsp 16 May 2006 01:20:20 -0000 1.14
@@ -123,12 +123,6 @@
-
-
-
-
-
-