Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteAction.java,v diff -u -r1.15 -r1.16 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteAction.java 13 May 2006 09:44:53 -0000 1.15 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteAction.java 14 May 2006 21:14:15 -0000 1.16 @@ -124,28 +124,21 @@ voteAuthoringForm.setExceptionMaxNominationInvalid(new Boolean(false).toString()); request.getSession().setAttribute(VALIDATION_ERROR, new Boolean(false).toString()); - request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0)); + voteAuthoringForm.setSbmtSuccess(new Boolean(false).toString()); return null; } - public ActionForward addNewOption(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) - throws IOException, ServletException + public boolean isNewOptionAdded(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { - logger.debug("dispathcing addNewOption"); + logger.debug("doing isNewOptionAdded"); VoteAuthoringForm voteAuthoringForm = (VoteAuthoringForm) form; logger.debug("voteAuthoringForm :" +voteAuthoringForm); voteAuthoringForm.setExceptionMaxNominationInvalid(new Boolean(false).toString()); voteAuthoringForm.setSubmissionAttempt(new Boolean(false).toString()); request.getSession().setAttribute(VALIDATION_ERROR, new Boolean(false).toString()); + voteAuthoringForm.setSbmtSuccess(new Boolean(false).toString()); - /* determine whether the request is from Monitoring url Edit Activity*/ - String sourceVoteStarter = (String) request.getAttribute(SOURCE_VOTE_STARTER); - logger.debug("sourceVoteStarter: " + sourceVoteStarter); - String destination=VoteUtils.getDestination(sourceVoteStarter); - logger.debug("destination: " + destination); - - request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0)); AuthoringUtil authoringUtil= new AuthoringUtil(); Map mapOptionsContent=(Map)request.getSession().getAttribute(MAP_OPTIONS_CONTENT); @@ -194,29 +187,37 @@ } } + return true; + + } + + public ActionForward addNewOption(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) + throws IOException, ServletException + { + logger.debug("dispathcing addNewOption"); + boolean isNewOptionAdded=isNewOptionAdded(mapping, form, request, response); + logger.debug("isNewOptionAdded:" + isNewOptionAdded); + + /* determine whether the request is from Monitoring url Edit Activity*/ + String sourceVoteStarter = (String) request.getAttribute(SOURCE_VOTE_STARTER); + logger.debug("sourceVoteStarter: " + sourceVoteStarter); + String destination=VoteUtils.getDestination(sourceVoteStarter); + logger.debug("destination: " + destination); return (mapping.findForward(destination)); } - public ActionForward removeOption(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) - throws IOException, ServletException + public boolean isOptionRemoved(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { - logger.debug("doing removeOption "); + logger.debug("starting isOptionRemoved "); VoteAuthoringForm voteAuthoringForm = (VoteAuthoringForm) form; logger.debug("voteAuthoringForm :" +voteAuthoringForm); voteAuthoringForm.setExceptionMaxNominationInvalid(new Boolean(false).toString()); voteAuthoringForm.setSubmissionAttempt(new Boolean(false).toString()); request.getSession().setAttribute(VALIDATION_ERROR, new Boolean(false).toString()); + voteAuthoringForm.setSbmtSuccess(new Boolean(false).toString()); - request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0)); - - /* determine whether the request is from Monitoring url Edit Activity*/ - String sourceVoteStarter = (String) request.getAttribute(SOURCE_VOTE_STARTER); - logger.debug("sourceVoteStarter: " + sourceVoteStarter); - String destination=VoteUtils.getDestination(sourceVoteStarter); - logger.debug("destination: " + destination); - VoteUtils.persistRichText(request); AuthoringUtil authoringUtil= new AuthoringUtil(); @@ -260,28 +261,39 @@ } } - return (mapping.findForward(destination)); + return true; } - public ActionForward submitAllContent(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) - throws IOException, ServletException { - - logger.debug("starting submitAllContent :" +form); - request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0)); + public ActionForward removeOption(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) + throws IOException, ServletException + { + logger.debug("doing removeOption "); + boolean isOptionRemoved=isOptionRemoved(mapping, form, request, response); + logger.debug("isOptionRemoved:" + isOptionRemoved); + + /* determine whether the request is from Monitoring url Edit Activity*/ + String sourceVoteStarter = (String) request.getAttribute(SOURCE_VOTE_STARTER); + logger.debug("sourceVoteStarter: " + sourceVoteStarter); + String destination=VoteUtils.getDestination(sourceVoteStarter); + logger.debug("destination: " + destination); + + return (mapping.findForward(destination)); + } + + + public boolean submitContent(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) + { + logger.debug("doing submitContent.."); + VoteAuthoringForm voteAuthoringForm = (VoteAuthoringForm) form; logger.debug("voteAuthoringForm :" +voteAuthoringForm); voteAuthoringForm.setExceptionMaxNominationInvalid(new Boolean(false).toString()); voteAuthoringForm.setSubmissionAttempt(new Boolean(true).toString()); request.getSession().setAttribute(VALIDATION_ERROR, new Boolean(false).toString()); + voteAuthoringForm.setSbmtSuccess(new Boolean(false).toString()); - /* determine whether the request is from Monitoring url Edit Activity*/ - String sourceVoteStarter = (String) request.getAttribute(SOURCE_VOTE_STARTER); - logger.debug("sourceVoteStarter: " + sourceVoteStarter); - String destination=VoteUtils.getDestination(sourceVoteStarter); - logger.debug("destination: " + destination); - IVoteService voteService = (IVoteService)request.getSession().getAttribute(TOOL_SERVICE); if (voteService == null) voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext()); @@ -317,7 +329,8 @@ logger.debug("returning back to from to fix errors:"); request.getSession().setAttribute(EDITACTIVITY_EDITMODE, new Boolean(true)); request.getSession().setAttribute(VALIDATION_ERROR, new Boolean(true).toString()); - return mapping.findForward(destination); + //return mapping.findForward(destination); + return false; } List attachmentList = (List) request.getSession().getAttribute(ATTACHMENT_LIST); @@ -346,16 +359,17 @@ boolean verifyDuplicatesOptionsMap=AuthoringUtil.verifyDuplicatesOptionsMap(mapOptionsContent); logger.debug("verifyDuplicatesOptionsMap: " + verifyDuplicatesOptionsMap); request.getSession().removeAttribute(USER_EXCEPTION_OPTIONS_DUPLICATE); + if (verifyDuplicatesOptionsMap == false) { request.getSession().setAttribute(USER_EXCEPTION_OPTIONS_DUPLICATE, new Boolean(true).toString()); logger.debug("add error.options.duplicate to ActionMessages"); persistError(request,"error.options.duplicate"); voteAuthoringForm.resetUserAction(); - return mapping.findForward(destination); + //return mapping.findForward(destination); + return false; } - logger.debug("submitting mapOptionsContent:" + mapOptionsContent); /*to remove deleted entries in the questions table based on mapQuestionContent */ @@ -368,7 +382,6 @@ String maxNomCount=voteAuthoringForm.getMaxNominationCount(); logger.debug("maxNomCount:" + maxNomCount); - String activeModule=voteAuthoringForm.getActiveModule(); logger.debug("activeModule:" + activeModule); @@ -382,7 +395,8 @@ { voteAuthoringForm.setExceptionMaxNominationInvalid(new Boolean(true).toString()); persistError(request,"error.maxNominationCount.invalid"); - return (mapping.findForward(LOAD_QUESTIONS)); + //return (mapping.findForward(LOAD_QUESTIONS)); + return false; } try @@ -394,7 +408,8 @@ { persistError(request,"error.maxNominationCount.invalid"); voteAuthoringForm.setExceptionMaxNominationInvalid(new Boolean(true).toString()); - return (mapping.findForward(LOAD_QUESTIONS)); + //return (mapping.findForward(LOAD_QUESTIONS)); + return false; } } @@ -418,7 +433,8 @@ errors.clear(); errors.add(Globals.ERROR_KEY, new ActionMessage("sbmt.successful")); - request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(1)); + //request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(1)); + voteAuthoringForm.setSbmtSuccess(new Boolean(true).toString()); logger.debug("setting SUBMIT_SUCCESS to 1."); Long strToolContentId=(Long)request.getSession().getAttribute(AttributeNames.PARAM_TOOL_CONTENT_ID); @@ -431,33 +447,56 @@ logger.debug("define later set to false"); voteAuthoringForm.resetUserAction(); - return mapping.findForward(destination); + return true; } - - public ActionForward moveOptionDown(ActionMapping mapping, + + public ActionForward submitAllContent(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) + throws IOException, ServletException { + + logger.debug("starting submitAllContent :" +form); + + VoteAuthoringForm voteAuthoringForm = (VoteAuthoringForm) form; + logger.debug("voteAuthoringForm :" +voteAuthoringForm); + voteAuthoringForm.setSbmtSuccess(new Boolean(false).toString()); + + + /* determine whether the request is from Monitoring url Edit Activity*/ + String sourceVoteStarter = (String) request.getAttribute(SOURCE_VOTE_STARTER); + logger.debug("sourceVoteStarter: " + sourceVoteStarter); + String destination=VoteUtils.getDestination(sourceVoteStarter); + logger.debug("destination: " + destination); + + + boolean isContentSubmitted=submitContent(mapping, form, request, response); + logger.debug("isContentSubmitted :" +isContentSubmitted); + + if (isContentSubmitted == true) + voteAuthoringForm.setSbmtSuccess(new Boolean(true).toString()); + + logger.debug("final submit status :" +voteAuthoringForm.getSbmtSuccess()); + return (mapping.findForward(destination)); + } + + + public boolean isMoveOptionDown(ActionMapping mapping, ActionForm form, HttpServletRequest request, - HttpServletResponse response) throws IOException, - ServletException + HttpServletResponse response) { + logger.debug("starting isMoveOptionDown..."); VoteUtils.cleanUpUserExceptions(request); logger.debug("dispatching moveOptionDown..."); VoteAuthoringForm voteAuthoringForm = (VoteAuthoringForm) form; logger.debug("voteAuthoringForm :" +voteAuthoringForm); voteAuthoringForm.setExceptionMaxNominationInvalid(new Boolean(false).toString()); voteAuthoringForm.setSubmissionAttempt(new Boolean(false).toString()); request.getSession().setAttribute(VALIDATION_ERROR, new Boolean(false).toString()); - - request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0)); + voteAuthoringForm.setSbmtSuccess(new Boolean(false).toString()); + + //request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0)); IVoteService voteService =VoteUtils.getToolService(request); - /* determine whether the request is from Monitoring url Edit Activity*/ - String sourceVoteStarter = (String) request.getAttribute(SOURCE_VOTE_STARTER); - logger.debug("sourceVoteStarter: " + sourceVoteStarter); - String destination=VoteUtils.getDestination(sourceVoteStarter); - logger.debug("destination: " + destination); - VoteUtils.persistRichText(request); Map mapOptionsContent=AuthoringUtil.repopulateMap(request, "optionContent"); @@ -512,28 +551,45 @@ } } + return true; + } + + + public ActionForward moveOptionDown(ActionMapping mapping, + ActionForm form, + HttpServletRequest request, + HttpServletResponse response) throws IOException, + ServletException + { + /* determine whether the request is from Monitoring url Edit Activity*/ + String sourceVoteStarter = (String) request.getAttribute(SOURCE_VOTE_STARTER); + logger.debug("sourceVoteStarter: " + sourceVoteStarter); + String destination=VoteUtils.getDestination(sourceVoteStarter); + logger.debug("destination: " + destination); + boolean isMoveOptionDown=isMoveOptionDown(mapping, form, request, response); + logger.debug("isMoveOptionDown:" + isMoveOptionDown); + return (mapping.findForward(destination)); } - - public ActionForward moveOptionUp(ActionMapping mapping, + public boolean isMoveOptionUp(ActionMapping mapping, ActionForm form, HttpServletRequest request, - HttpServletResponse response) throws IOException, - ServletException + HttpServletResponse response) { + logger.debug("starting isMoveOptionUp..."); VoteUtils.cleanUpUserExceptions(request); - logger.debug("dispatching moveOptionUp..."); + VoteAuthoringForm voteAuthoringForm = (VoteAuthoringForm) form; - request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0)); + voteAuthoringForm.setSbmtSuccess(new Boolean(false).toString()); logger.debug("voteAuthoringForm :" +voteAuthoringForm); voteAuthoringForm.setExceptionMaxNominationInvalid(new Boolean(false).toString()); voteAuthoringForm.setSubmissionAttempt(new Boolean(false).toString()); request.getSession().setAttribute(VALIDATION_ERROR, new Boolean(false).toString()); - IVoteService voteService =VoteUtils.getToolService(request); + IVoteService voteService =VoteUtils.getToolService(request); /* determine whether the request is from Monitoring url Edit Activity*/ String sourceVoteStarter = (String) request.getAttribute(SOURCE_VOTE_STARTER); @@ -595,15 +651,33 @@ } } - - return (mapping.findForward(destination)); + return true; } + public ActionForward moveOptionUp(ActionMapping mapping, + ActionForm form, + HttpServletRequest request, + HttpServletResponse response) throws IOException, + ServletException + { + /* determine whether the request is from Monitoring url Edit Activity*/ + String sourceVoteStarter = (String) request.getAttribute(SOURCE_VOTE_STARTER); + logger.debug("sourceVoteStarter: " + sourceVoteStarter); + String destination=VoteUtils.getDestination(sourceVoteStarter); + logger.debug("destination: " + destination); + + boolean isMoveOptionUp=isMoveOptionUp(mapping, form, request, response); + logger.debug("isMoveOptionUp:" + isMoveOptionUp); + + return (mapping.findForward(destination)); + } + protected ActionMessages validateSubmit(HttpServletRequest request, ActionMessages errors, VoteAuthoringForm voteAuthoringForm) { - request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0)); + //request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0)); + voteAuthoringForm.setSbmtSuccess(new Boolean(false).toString()); String title = voteAuthoringForm.getTitle(); logger.debug("title: " + title); @@ -655,7 +729,8 @@ voteAuthoringForm.setSubmissionAttempt(new Boolean(false).toString()); request.getSession().setAttribute(VALIDATION_ERROR, new Boolean(false).toString()); - request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0)); + //request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0)); + voteAuthoringForm.setSbmtSuccess(new Boolean(false).toString()); IVoteService voteService =VoteUtils.getToolService(request); /* determine whether the request is from Monitoring url Edit Activity*/ @@ -709,7 +784,8 @@ voteAuthoringForm.setExceptionMaxNominationInvalid(new Boolean(false).toString()); voteAuthoringForm.setSubmissionAttempt(new Boolean(false).toString()); request.getSession().setAttribute(VALIDATION_ERROR, new Boolean(false).toString()); - request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0)); + //request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0)); + voteAuthoringForm.setSbmtSuccess(new Boolean(false).toString()); IVoteService voteService =VoteUtils.getToolService(request); @@ -763,7 +839,8 @@ voteAuthoringForm.setExceptionMaxNominationInvalid(new Boolean(false).toString()); voteAuthoringForm.setSubmissionAttempt(new Boolean(false).toString()); request.getSession().setAttribute(VALIDATION_ERROR, new Boolean(false).toString()); - request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0)); + //request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0)); + voteAuthoringForm.setSbmtSuccess(new Boolean(false).toString()); IVoteService voteService =VoteUtils.getToolService(request); @@ -804,7 +881,8 @@ voteAuthoringForm.setExceptionMaxNominationInvalid(new Boolean(false).toString()); voteAuthoringForm.setSubmissionAttempt(new Boolean(false).toString()); request.getSession().setAttribute(VALIDATION_ERROR, new Boolean(false).toString()); - request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0)); + //request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0)); + voteAuthoringForm.setSbmtSuccess(new Boolean(false).toString()); IVoteService voteService =VoteUtils.getToolService(request); @@ -844,6 +922,7 @@ voteAuthoringForm.setExceptionMaxNominationInvalid(new Boolean(false).toString()); voteAuthoringForm.setSubmissionAttempt(new Boolean(false).toString()); request.getSession().setAttribute(VALIDATION_ERROR, new Boolean(false).toString()); + voteAuthoringForm.setSbmtSuccess(new Boolean(false).toString()); IVoteService voteService = (IVoteService)request.getSession().getAttribute(TOOL_SERVICE); logger.debug("voteService: " + voteService); Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteAuthoringForm.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/Attic/VoteAuthoringForm.java,v diff -u -r1.9 -r1.10 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteAuthoringForm.java 13 May 2006 09:44:53 -0000 1.9 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteAuthoringForm.java 14 May 2006 21:14:15 -0000 1.10 @@ -181,6 +181,7 @@ this.edit=null; this.submit=null; this.submissionAttempt=null; + this.sbmtSuccess=null; } public void resetRadioBoxes() @@ -771,4 +772,5 @@ public void setSubmissionAttempt(String submissionAttempt) { this.submissionAttempt = submissionAttempt; } + } Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningForm.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/Attic/VoteLearningForm.java,v diff -u -r1.11 -r1.12 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningForm.java 6 May 2006 07:42:22 -0000 1.11 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningForm.java 14 May 2006 21:14:15 -0000 1.12 @@ -37,6 +37,8 @@ protected String optionValue; protected String checked; + protected String sbmtSuccess; + protected String userEntry; protected String dispatch; protected String toolContentID; @@ -605,4 +607,18 @@ public void setMaxNominationCountReached(String maxNominationCountReached) { this.maxNominationCountReached = maxNominationCountReached; } + + /** + * @return Returns the sbmtSuccess. + */ + public String getSbmtSuccess() { + return sbmtSuccess; + } + /** + * @param sbmtSuccess The sbmtSuccess to set. + */ + public void setSbmtSuccess(String sbmtSuccess) { + this.sbmtSuccess = sbmtSuccess; + } + } Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringAction.java,v diff -u -r1.12 -r1.13 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringAction.java 13 May 2006 09:44:53 -0000 1.12 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringAction.java 14 May 2006 21:14:15 -0000 1.13 @@ -586,15 +586,36 @@ throws IOException, ServletException { logger.debug("dispatching proxy submitAllContent..."); request.getSession().setAttribute(ACTIVE_MODULE, DEFINE_LATER); - + request.setAttribute(SOURCE_VOTE_STARTER, "monitoring"); logger.debug("SOURCE_VOTE_STARTER: monitoring"); VoteAction voteAction= new VoteAction(); - return voteAction.submitAllContent(mapping, form, request, response); + VoteMonitoringForm voteMonitoringForm = (VoteMonitoringForm) form; + logger.debug("voteMonitoringForm :" +voteMonitoringForm); + voteMonitoringForm.setSbmtSuccess(new Boolean(false).toString()); + voteMonitoringForm.setActiveModule(DEFINE_LATER); + + + /* determine whether the request is from Monitoring url Edit Activity*/ + String sourceVoteStarter = (String) request.getAttribute(SOURCE_VOTE_STARTER); + logger.debug("sourceVoteStarter: " + sourceVoteStarter); + String destination=VoteUtils.getDestination(sourceVoteStarter); + logger.debug("destination: " + destination); + + + boolean isContentSubmitted=voteAction.submitContent(mapping, form, request, response); + logger.debug("isContentSubmitted :" +isContentSubmitted); + + if (isContentSubmitted == true) + voteMonitoringForm.setSbmtSuccess(new Boolean(true).toString()); + + logger.debug("final submit status :" +voteMonitoringForm.getSbmtSuccess()); + return (mapping.findForward(destination)); } + public ActionForward addNewOption(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { @@ -603,8 +624,20 @@ request.setAttribute(SOURCE_VOTE_STARTER, "monitoring"); logger.debug("SOURCE_VOTE_STARTER: monitoring"); + VoteMonitoringForm voteMonitoringForm = (VoteMonitoringForm) form; + voteMonitoringForm.setSbmtSuccess(new Boolean(false).toString()); + + /* determine whether the request is from Monitoring url Edit Activity*/ + String sourceVoteStarter = (String) request.getAttribute(SOURCE_VOTE_STARTER); + logger.debug("sourceVoteStarter: " + sourceVoteStarter); + String destination=VoteUtils.getDestination(sourceVoteStarter); + logger.debug("destination: " + destination); + VoteAction voteAction= new VoteAction(); - return voteAction.addNewOption(mapping, form, request, response); + + boolean isNewOptionAdded=voteAction.isNewOptionAdded(mapping, form, request, response); + logger.debug("isNewOptionAdded:" + isNewOptionAdded); + return (mapping.findForward(destination)); } @@ -622,7 +655,17 @@ logger.debug("SOURCE_VOTE_STARTER: monitoring"); VoteAction voteAction= new VoteAction(); - return voteAction.removeOption(mapping, form, request, response); + + /* determine whether the request is from Monitoring url Edit Activity*/ + String sourceVoteStarter = (String) request.getAttribute(SOURCE_VOTE_STARTER); + logger.debug("sourceVoteStarter: " + sourceVoteStarter); + String destination=VoteUtils.getDestination(sourceVoteStarter); + logger.debug("destination: " + destination); + + boolean isOptionRemoved=voteAction.isOptionRemoved(mapping, form, request, response); + logger.debug("isOptionRemoved :" +isOptionRemoved); + + return (mapping.findForward(destination)); } @@ -638,9 +681,20 @@ logger.debug("SOURCE_VOTE_STARTER: monitoring"); VoteAction voteAction= new VoteAction(); - return voteAction.moveOptionDown(mapping, form, request, response); + + /* determine whether the request is from Monitoring url Edit Activity*/ + String sourceVoteStarter = (String) request.getAttribute(SOURCE_VOTE_STARTER); + logger.debug("sourceVoteStarter: " + sourceVoteStarter); + String destination=VoteUtils.getDestination(sourceVoteStarter); + logger.debug("destination: " + destination); + + boolean isMoveOptionDown=voteAction.isMoveOptionDown(mapping, form, request, response); + logger.debug("isMoveOptionDown :" +isMoveOptionDown); + + return (mapping.findForward(destination)); } + public ActionForward moveOptionUp(ActionMapping mapping, ActionForm form, HttpServletRequest request, @@ -651,9 +705,19 @@ request.setAttribute(SOURCE_VOTE_STARTER, "monitoring"); logger.debug("SOURCE_VOTE_STARTER: monitoring"); - + + /* determine whether the request is from Monitoring url Edit Activity*/ + String sourceVoteStarter = (String) request.getAttribute(SOURCE_VOTE_STARTER); + logger.debug("sourceVoteStarter: " + sourceVoteStarter); + String destination=VoteUtils.getDestination(sourceVoteStarter); + logger.debug("destination: " + destination); + VoteAction voteAction= new VoteAction(); - return voteAction.moveOptionUp(mapping, form, request, response); + boolean isMoveOptionUp=voteAction.isMoveOptionUp(mapping, form, request, response); + logger.debug("isMoveOptionUp:" + isMoveOptionUp); + + return (mapping.findForward(destination)); + } /** Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringForm.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/Attic/VoteMonitoringForm.java,v diff -u -r1.3 -r1.4 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringForm.java 20 Apr 2006 12:24:29 -0000 1.3 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringForm.java 14 May 2006 21:14:15 -0000 1.4 @@ -31,6 +31,7 @@ */ public class VoteMonitoringForm extends VoteAuthoringForm implements VoteAppConstants { // controls which method is called by the Lookup map */ + protected String method; protected String selectedToolSessionId; @@ -75,4 +76,5 @@ public void setMethod(String method) { this.method = method; } + } Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringStarterAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringStarterAction.java,v diff -u -r1.13 -r1.14 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringStarterAction.java 13 May 2006 09:44:53 -0000 1.13 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringStarterAction.java 14 May 2006 21:14:15 -0000 1.14 @@ -118,19 +118,25 @@ request.getSession().setAttribute(ACTIVE_MODULE, MONITORING); + voteMonitoringForm.setActiveModule(MONITORING); voteMonitoringForm.setSelectedToolSessionId("All"); + voteMonitoringForm.setSbmtSuccess(new Boolean(false).toString()); return voteMonitoringAction.submitSession(mapping, form, request, response); } public boolean initialiseMonitoringData(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { logger.debug("start initializing monitoring data..."); + + VoteMonitoringForm voteMonitoringForm = (VoteMonitoringForm) form; + IVoteService voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext()); request.getSession().setAttribute(TOOL_SERVICE, voteService); request.getSession().setAttribute(CURRENT_MONITORING_TAB, "summary"); - request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0)); + //request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0)); + voteMonitoringForm.setSbmtSuccess(new Boolean(false).toString()); request.getSession().setAttribute(DEFINE_LATER_IN_EDIT_MODE, new Boolean(false)); request.getSession().setAttribute(REQUEST_LEARNING_REPORT, new Boolean(false).toString()); Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteStarterAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteStarterAction.java,v diff -u -r1.16 -r1.17 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteStarterAction.java 13 May 2006 09:44:53 -0000 1.16 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteStarterAction.java 14 May 2006 21:14:15 -0000 1.17 @@ -127,9 +127,9 @@ logger.debug("retrieving voteService from cache: " + voteService); } request.getSession().setAttribute(TOOL_SERVICE, voteService); - request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0)); voteAuthoringForm.setSubmissionAttempt(new Boolean(false).toString()); - + voteAuthoringForm.setSbmtSuccess(new Boolean(false).toString()); + String servletPath=request.getServletPath(); logger.debug("getServletPath: "+ servletPath); if (servletPath.indexOf("authoringStarter") > 0) @@ -138,15 +138,13 @@ request.getSession().setAttribute(ACTIVE_MODULE, AUTHORING); voteAuthoringForm.setActiveModule(AUTHORING); request.getSession().setAttribute(DEFINE_LATER_IN_EDIT_MODE, new Boolean(true)); - request.getSession().setAttribute(SHOW_AUTHORING_TABS,new Boolean(true).toString()); } else { logger.debug("request is for define later module. either direct or by monitoring module"); request.getSession().setAttribute(ACTIVE_MODULE, DEFINE_LATER); voteAuthoringForm.setActiveModule(DEFINE_LATER); request.getSession().setAttribute(DEFINE_LATER_IN_EDIT_MODE, new Boolean(false)); - request.getSession().setAttribute(SHOW_AUTHORING_TABS,new Boolean(false).toString()); } initialiseAttributes(request); Index: lams_tool_vote/web/authoring/BasicContent.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/web/authoring/BasicContent.jsp,v diff -u -r1.14 -r1.15 --- lams_tool_vote/web/authoring/BasicContent.jsp 13 May 2006 09:44:53 -0000 1.14 +++ lams_tool_vote/web/authoring/BasicContent.jsp 14 May 2006 21:14:15 -0000 1.15 @@ -37,7 +37,7 @@
- + images/success.gif" align="left" width=20 height=20> Index: lams_tool_vote/web/authoring/InstructionsContent.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/web/authoring/Attic/InstructionsContent.jsp,v diff -u -r1.3 -r1.4 --- lams_tool_vote/web/authoring/InstructionsContent.jsp 19 Apr 2006 11:00:48 -0000 1.3 +++ lams_tool_vote/web/authoring/InstructionsContent.jsp 14 May 2006 21:14:15 -0000 1.4 @@ -32,12 +32,6 @@ - - -
- -
-