Index: lams_tool_laqa/.classpath =================================================================== diff -u -r6582f99968f17e3e54b6f83230f6fe0b67b019e6 -r79aa6d305d1c62b1aed8e0f8dfdedcc8e5c4bedb --- lams_tool_laqa/.classpath (.../.classpath) (revision 6582f99968f17e3e54b6f83230f6fe0b67b019e6) +++ lams_tool_laqa/.classpath (.../.classpath) (revision 79aa6d305d1c62b1aed8e0f8dfdedcc8e5c4bedb) @@ -8,5 +8,6 @@ + - \ No newline at end of file + Index: lams_tool_laqa/conf/language/ApplicationResources.properties =================================================================== diff -u -re263e51e8e1faf1463ea508f5432bcde98a88652 -r79aa6d305d1c62b1aed8e0f8dfdedcc8e5c4bedb --- lams_tool_laqa/conf/language/ApplicationResources.properties (.../ApplicationResources.properties) (revision e263e51e8e1faf1463ea508f5432bcde98a88652) +++ lams_tool_laqa/conf/language/ApplicationResources.properties (.../ApplicationResources.properties) (revision 79aa6d305d1c62b1aed8e0f8dfdedcc8e5c4bedb) @@ -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 =================================================================== diff -u --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/ClearSessionAction.java (revision 0) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/ClearSessionAction.java (revision 79aa6d305d1c62b1aed8e0f8dfdedcc8e5c4bedb) @@ -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 =================================================================== diff -u -r65166da92a6f0f4ff73acb92b95672e237b25742 -r79aa6d305d1c62b1aed8e0f8dfdedcc8e5c4bedb --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaAction.java (.../QaAction.java) (revision 65166da92a6f0f4ff73acb92b95672e237b25742) +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaAction.java (.../QaAction.java) (revision 79aa6d305d1c62b1aed8e0f8dfdedcc8e5c4bedb) @@ -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 =================================================================== diff -u -r2c5c7c68e66e26cef44208bc922b056e3bfb1dd6 -r79aa6d305d1c62b1aed8e0f8dfdedcc8e5c4bedb --- lams_tool_laqa/test/web/WEB-INF/struts-config.xml (.../struts-config.xml) (revision 2c5c7c68e66e26cef44208bc922b056e3bfb1dd6) +++ lams_tool_laqa/test/web/WEB-INF/struts-config.xml (.../struts-config.xml) (revision 79aa6d305d1c62b1aed8e0f8dfdedcc8e5c4bedb) @@ -205,7 +205,9 @@ /> - + + Index: lams_tool_laqa/web/WEB-INF/lams.tld =================================================================== diff -u -r9bf9b53faf1c91294d4c2d9a306cb896e131d373 -r79aa6d305d1c62b1aed8e0f8dfdedcc8e5c4bedb --- lams_tool_laqa/web/WEB-INF/lams.tld (.../lams.tld) (revision 9bf9b53faf1c91294d4c2d9a306cb896e131d373) +++ lams_tool_laqa/web/WEB-INF/lams.tld (.../lams.tld) (revision 79aa6d305d1c62b1aed8e0f8dfdedcc8e5c4bedb) @@ -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 =================================================================== diff -u -r59dfd09ebb07bbd0179ba9badecd978a53af0d9f -r79aa6d305d1c62b1aed8e0f8dfdedcc8e5c4bedb --- lams_tool_laqa/web/WEB-INF/struts-config.xml (.../struts-config.xml) (revision 59dfd09ebb07bbd0179ba9badecd978a53af0d9f) +++ lams_tool_laqa/web/WEB-INF/struts-config.xml (.../struts-config.xml) (revision 79aa6d305d1c62b1aed8e0f8dfdedcc8e5c4bedb) @@ -482,6 +482,9 @@ redirect="false" /> + + Index: lams_tool_laqa/web/WEB-INF/tags/AuthoringButton.tag =================================================================== diff -u --- lams_tool_laqa/web/WEB-INF/tags/AuthoringButton.tag (revision 0) +++ lams_tool_laqa/web/WEB-INF/tags/AuthoringButton.tag (revision 79aa6d305d1c62b1aed8e0f8dfdedcc8e5c4bedb) @@ -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/WEB-INF/web.xml =================================================================== diff -u -r477b19dd83e2be0e1b3b2493fb4cdbe68a5cddc1 -r79aa6d305d1c62b1aed8e0f8dfdedcc8e5c4bedb --- lams_tool_laqa/web/WEB-INF/web.xml (.../web.xml) (revision 477b19dd83e2be0e1b3b2493fb4cdbe68a5cddc1) +++ lams_tool_laqa/web/WEB-INF/web.xml (.../web.xml) (revision 79aa6d305d1c62b1aed8e0f8dfdedcc8e5c4bedb) @@ -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/authoring/AuthoringTabsHolder.jsp =================================================================== diff -u -re6e6aa4b83b6a5f62f7cae530495663c3bab242e -r79aa6d305d1c62b1aed8e0f8dfdedcc8e5c4bedb --- lams_tool_laqa/web/authoring/AuthoringTabsHolder.jsp (.../AuthoringTabsHolder.jsp) (revision e6e6aa4b83b6a5f62f7cae530495663c3bab242e) +++ lams_tool_laqa/web/authoring/AuthoringTabsHolder.jsp (.../AuthoringTabsHolder.jsp) (revision 79aa6d305d1c62b1aed8e0f8dfdedcc8e5c4bedb) @@ -104,8 +104,8 @@ - - + + @@ -125,6 +125,11 @@ + + + + @@ -145,6 +150,9 @@ + + Index: lams_tool_laqa/web/authoring/BasicContent.jsp =================================================================== diff -u -r65166da92a6f0f4ff73acb92b95672e237b25742 -r79aa6d305d1c62b1aed8e0f8dfdedcc8e5c4bedb --- lams_tool_laqa/web/authoring/BasicContent.jsp (.../BasicContent.jsp) (revision 65166da92a6f0f4ff73acb92b95672e237b25742) +++ lams_tool_laqa/web/authoring/BasicContent.jsp (.../BasicContent.jsp) (revision 79aa6d305d1c62b1aed8e0f8dfdedcc8e5c4bedb) @@ -123,12 +123,6 @@ -
-

- - -

-