Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaAppConstants.java
===================================================================
diff -u -ra3634c820325bf6c2b95e1fb9fc318212a52f389 -r97b1c18891d6f978154b222ec1ff092f26d4dd4a
--- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaAppConstants.java (.../QaAppConstants.java) (revision a3634c820325bf6c2b95e1fb9fc318212a52f389)
+++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaAppConstants.java (.../QaAppConstants.java) (revision 97b1c18891d6f978154b222ec1ff092f26d4dd4a)
@@ -279,6 +279,7 @@
public static final String ATTACHMENT_LIST ="attachmentList";
+ public static final String SUBMIT_SUCCESS ="sbmtSuccess";
public static final String DELETED_ATTACHMENT_LIST ="deletedAttachmentList";
public static final String UUID ="uuid";
}
Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaResources.properties
===================================================================
diff -u -reca9ea46fefb353002e27446469b7c406e9fa621 -r97b1c18891d6f978154b222ec1ff092f26d4dd4a
--- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaResources.properties (.../QaResources.properties) (revision eca9ea46fefb353002e27446469b7c406e9fa621)
+++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaResources.properties (.../QaResources.properties) (revision 97b1c18891d6f978154b222ec1ff092f26d4dd4a)
@@ -58,6 +58,7 @@
error.reportTitle =The field "Report Title (Advanced)" is mandatory.
error.defaultquestion.empty =The first question can not be empty.
submit.successful =The content has been created successfully.
+submit.unSuccessful =Warning: An error occurred while saving the content.
error.content.locked =The content has been locked since it is being used by one mor more learners.
The modification of the content is not allowed.
error.content.inUse =The modification of the content is not allowed since one or more students has attempted the activity.
Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QAction.java
===================================================================
diff -u -r477b912833d8e02d5096929e880f495accb632b9 -r97b1c18891d6f978154b222ec1ff092f26d4dd4a
--- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QAction.java (.../QAction.java) (revision 477b912833d8e02d5096929e880f495accb632b9)
+++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QAction.java (.../QAction.java) (revision 97b1c18891d6f978154b222ec1ff092f26d4dd4a)
@@ -381,11 +381,14 @@
// }
public ActionForward unspecified(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) {
+ request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0));
return (mapping.findForward(LOAD_QUESTIONS));
}
public ActionForward submitAllContent(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException {
+
+ request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0));
QaAuthoringForm qaAuthoringForm = (QaAuthoringForm) form;
IQaService qaService = QaServiceProxy.getQaService(getServlet().getServletContext());
AuthoringUtil authoringUtil= new AuthoringUtil();
@@ -439,8 +442,11 @@
/*give the user a feedback*/
errors.clear();
- errors.add(Globals.ERROR_KEY, new ActionMessage("submit.successful"));
- logger.debug("submit successful.");
+ errors.add(Globals.ERROR_KEY, new ActionMessage("submit.successful"));
+ request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(1));
+ logger.debug("setting SUBMIT_SUCCESS to 1.");
+
+
saveErrors(request,errors);
qaAuthoringForm.resetUserAction();
@@ -456,6 +462,7 @@
public ActionForward addNewQuestion(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException {
+ request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0));
AuthoringUtil authoringUtil= new AuthoringUtil();
Map mapQuestionContent=(Map)request.getSession().getAttribute(MAP_QUESTION_CONTENT);
@@ -467,6 +474,7 @@
public ActionForward removeQuestion(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException {
+ request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0));
AuthoringUtil authoringUtil= new AuthoringUtil();
QaAuthoringForm qaAuthoringForm = (QaAuthoringForm) form;
Map mapQuestionContent=(Map)request.getSession().getAttribute(MAP_QUESTION_CONTENT);
@@ -479,6 +487,7 @@
public ActionForward addNewFile(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException {
+ request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0));
QaAuthoringForm qaAuthoringForm = (QaAuthoringForm) form;
addFileToContentRepository(request, qaAuthoringForm);
@@ -493,6 +502,7 @@
HttpServletResponse response) throws IOException,
ServletException
{
+ request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0));
long uuid = WebUtil.readLongParam(request, UUID);
// move the file's details from the attachment collection to the deleted attachments collection
@@ -523,6 +533,7 @@
*/
protected ActionMessages validateSubmit(HttpServletRequest request, ActionMessages errors, QaAuthoringForm qaAuthoringForm)
{
+ request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0));
// String richTextTitle=(String) request.getSession().getAttribute(RICHTEXT_TITLE);
String title = qaAuthoringForm.getTitle();
logger.debug("title: " + title);
@@ -647,6 +658,7 @@
HttpServletResponse response) throws IOException,
ServletException, ToolException
{
+ request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0));
/*
* if the content is not ready yet, don't even proceed.
* check the define later status
Index: lams_tool_laqa/web/AdvancedContent.jsp
===================================================================
diff -u -reca9ea46fefb353002e27446469b7c406e9fa621 -r97b1c18891d6f978154b222ec1ff092f26d4dd4a
--- lams_tool_laqa/web/AdvancedContent.jsp (.../AdvancedContent.jsp) (revision eca9ea46fefb353002e27446469b7c406e9fa621)
+++ lams_tool_laqa/web/AdvancedContent.jsp (.../AdvancedContent.jsp) (revision 97b1c18891d6f978154b222ec1ff092f26d4dd4a)
@@ -3,6 +3,7 @@
<%@ taglib uri="/WEB-INF/struts-logic-el.tld" prefix="logic-el" %>
<%@ taglib uri="/WEB-INF/c.tld" prefix="c" %>
<%@ taglib uri="/WEB-INF/fmt.tld" prefix="fmt" %>
+<%@ taglib uri="/WEB-INF/lams.tld" prefix="lams" %>