Index: lams_tool_vote/conf/language/ApplicationResources.properties =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/conf/language/Attic/ApplicationResources.properties,v diff -u -r1.10 -r1.11 --- lams_tool_vote/conf/language/ApplicationResources.properties 24 Apr 2006 13:10:16 -0000 1.10 +++ lams_tool_vote/conf/language/ApplicationResources.properties 25 Apr 2006 10:52:46 -0000 1.11 @@ -47,11 +47,12 @@ label.individual.results.withRetries =Results for Voting with Retries label.individual.results.withoutRetries =Results for Voting without Retries label.viewAnswers =Previous Answers +label.viewNominations =Previous Nominations label.learner.viewAnswers =Learner's Answers label.withRetries.results.summary =Voting with Retries Summary label.withoutRetries.results.summary =Voting without Retries Summary label.learning.reportMessage =Thank you for your participation!
The following is a summary of your answers. -label.learning.forceFinishMessage =You have reached the maximum number of nominations for this activity. Please finish. +label.learning.forceFinishMessage =You have reached the maximum number of votes limit. Please finish. count.total.user =Total Users Count: count.finished.user =Finished User Count: count.max.attempt =Maximum Attempt Count: @@ -62,6 +63,7 @@ label.view.summary =View Summary label.view.answers =View Answers label.view.answers =View Nominations +label.nominated =Nominated label.view =View label.download =Download label.delete =Delete @@ -106,38 +108,18 @@ label.uploadedOnlineFiles =Uploaded Online Files: option.on =ON option.off =OFF -label.feedback.incorrect =Feedback if answered incorrectly: -label.feedback.correct =Feedback if answered correctly: -label.learner.redo =Are you sure you want to answer the questions again? -label.learner.bestMark =Your best mark so far is -label.outof =out of -label.mustGet =Must get at least -label.toFinish =to finish label.save =Save label.cancel =Cancel feedback =Please address the following issues before submit.
error.maxNominationCount.invalid =Please correct this: The "Max Nominations" field in Advanced section is invalid. error.default.content.notSetup =The tool initialization error: The tool default content has not been set up properly. -error.questions.submitted.none =Please correct this: No questions have been submitted. Please also note that the questions with no candidate answers are being automatically removed. error.question.empty =Please correct this: The question text can not be empty. -error.weights.empty =Please correct this: The question weights can not be empty. -error.checkBoxes.empty =Please correct this: No candidate answer has been selected. -error.weights.zero =Please correct this: The question weights can not be 0. -error.weights.notInteger =Please correct this: The question weights must be an integer. -error.question.weight.total =Please correct this: The total question weight:100 has been reached. -error.answers.duplicate =Please correct this: The candidate answers must be unique. error.emptyQuestion =Please enter the question text. The chosen question can not be empty. -error.singleOption =Please correct this: There must be at least 2 candidate answers. -error.emptyWeight =Sorry, the question can not be added without a weight. error.title =Please correct this: The field "Title" is mandatory.
error.instructions =Please correct this: The field "Instructions" is mandatory.
error.reportTitle =Please correct this: The field "Report Title (Advanced)" is mandatory.
error.defaultoption.empty =Please correct this: The first nomination can not be empty.
-error.passMark.empty =Please correct this: Pass Mark can not be empty. -options.count.zero =Please correct this: There must be at least one candidate answer. -error.passmark.notInteger =Please correct this: Pass Mark can only be an integer. -error.weights.total.invalid =Please correct this: The total weight must equal 100. Please also note that the questions with no candidate answers are being automatically removed. error.learner.userId.required =Tool Activity Error! Can't continue. Tool Activity expects learner's user id. error.learner.user.doesNoExist =Tool Activity Error! Learner is not ready in the tool's database yet. error.file.notPersisted =An error occurred: The file is not viewable yet. Please save all the content first and check back. @@ -147,12 +129,7 @@ error.toolContent.notAvailable =Tool Activity Error! Can't continue. Tool content is not ready in the tool's database yet.
Please verify the API method: public void createToolSession(Long toolSessionId, Long toolContentId) has run properly. error.learner.required =Tool Activity Error! Can't continue. The Learner records are not ready in the tool's database yet. error.fileName.empty =Please correct this: Under "Instructions", the file(name) to upload can not be empty. -error.questions.withNoOptions =Please note: The questions with no candidate answers have been automatically removed for you. Please check total question weight. -error.answers.empty =Please correct this: Candidate answers can not be empty. error.passMark.greater100 =Please correct this: The passmark can not be greater than 100% -error.question.addNotAllowed.thisScreen = The question text can not be modified in this screen since it has options attached . Please use the "Options" button to edit the question text. -error.question.removeNotAllowed.thisScreen = The question can not be removed since one or more of the question texts has been modified. Please try again without any text modifications. -error.selectedIndex.empty =Can not continue. Please select the correct answer and click "Done". 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.doesNotExist =Tool Activity Error! Can't continue. Tool content is not ready in the tool's database yet. error.content.inUse =The modification of the content is not allowed since it is being used. @@ -176,6 +153,7 @@ label.attemptTime =Attempt Date/Time label.timezone =Time-Zone label.response =Response +sbmt.learner.nominations.successful =Your nominations have been submitted. label.learning.forceOfflineMessage =This is an offline activity. Please see your instructor for details. label.learning.runOffline =This activity is not being done on the computer. Please see your instructor for details. error.defineLater =Sorry, the activity's content is not ready yet. Please wait for the teacher to define this part. 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.11 -r1.12 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteAction.java 24 Apr 2006 15:17:00 -0000 1.11 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteAction.java 25 Apr 2006 10:52:46 -0000 1.12 @@ -122,6 +122,7 @@ VoteUtils.persistRichText(request); voteAuthoringForm.resetUserAction(); + voteAuthoringForm.setExceptionMaxNominationInvalid(new Boolean(false).toString()); request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0)); return null; } @@ -131,6 +132,9 @@ throws IOException, ServletException { logger.debug("dispathcing addNewOption"); + VoteAuthoringForm voteAuthoringForm = (VoteAuthoringForm) form; + logger.debug("voteAuthoringForm :" +voteAuthoringForm); + voteAuthoringForm.setExceptionMaxNominationInvalid(new Boolean(false).toString()); /* determine whether the request is from Monitoring url Edit Activity*/ String sourceVoteStarter = (String) request.getAttribute(SOURCE_VOTE_STARTER); @@ -170,6 +174,10 @@ throws IOException, ServletException { logger.debug("doing removeOption "); + VoteAuthoringForm voteAuthoringForm = (VoteAuthoringForm) form; + logger.debug("voteAuthoringForm :" +voteAuthoringForm); + voteAuthoringForm.setExceptionMaxNominationInvalid(new Boolean(false).toString()); + request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0)); /* determine whether the request is from Monitoring url Edit Activity*/ @@ -181,7 +189,6 @@ VoteUtils.persistRichText(request); AuthoringUtil authoringUtil= new AuthoringUtil(); - VoteAuthoringForm voteAuthoringForm = (VoteAuthoringForm) form; Map mapOptionsContent=(Map)request.getSession().getAttribute(MAP_OPTIONS_CONTENT); logger.debug("mapOptionsContent: " + mapOptionsContent); @@ -209,6 +216,8 @@ request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0)); VoteAuthoringForm voteAuthoringForm = (VoteAuthoringForm) form; logger.debug("voteAuthoringForm :" +voteAuthoringForm); + voteAuthoringForm.setExceptionMaxNominationInvalid(new Boolean(false).toString()); + /* determine whether the request is from Monitoring url Edit Activity*/ String sourceVoteStarter = (String) request.getAttribute(SOURCE_VOTE_STARTER); @@ -284,10 +293,9 @@ if (maxNomCount.equals("0")) { - request.setAttribute(USER_EXCEPTION_MAXNOMINATION_INVALID, new Boolean(true).toString()); + voteAuthoringForm.setExceptionMaxNominationInvalid(new Boolean(true).toString()); persistError(request,"error.maxNominationCount.invalid"); - voteAuthoringForm.resetUserAction(); - return (mapping.findForward(LOAD_QUESTIONS)); + return (mapping.findForward(LOAD_QUESTIONS)); } try @@ -297,10 +305,9 @@ } catch(NumberFormatException e) { - request.setAttribute(USER_EXCEPTION_MAXNOMINATION_INVALID, new Boolean(true).toString()); persistError(request,"error.maxNominationCount.invalid"); - voteAuthoringForm.resetUserAction(); - return (mapping.findForward(LOAD_QUESTIONS)); + voteAuthoringForm.setExceptionMaxNominationInvalid(new Boolean(true).toString()); + return (mapping.findForward(LOAD_QUESTIONS)); } @@ -344,10 +351,12 @@ { VoteUtils.cleanUpUserExceptions(request); logger.debug("dispatching moveOptionDown..."); - request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0)); - VoteAuthoringForm voteAuthoringForm = (VoteAuthoringForm) form; - IVoteService voteService =VoteUtils.getToolService(request); + logger.debug("voteAuthoringForm :" +voteAuthoringForm); + voteAuthoringForm.setExceptionMaxNominationInvalid(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); @@ -403,9 +412,11 @@ { VoteUtils.cleanUpUserExceptions(request); logger.debug("dispatching moveOptionUp..."); + VoteAuthoringForm voteAuthoringForm = (VoteAuthoringForm) form; request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0)); - VoteAuthoringForm voteAuthoringForm = (VoteAuthoringForm) form; + logger.debug("voteAuthoringForm :" +voteAuthoringForm); + voteAuthoringForm.setExceptionMaxNominationInvalid(new Boolean(false).toString()); IVoteService voteService =VoteUtils.getToolService(request); /* determine whether the request is from Monitoring url Edit Activity*/ @@ -499,11 +510,13 @@ { VoteUtils.cleanUpUserExceptions(request); logger.debug("dispatching submitOfflineFile..."); - request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0)); - VoteAuthoringForm voteAuthoringForm = (VoteAuthoringForm) form; - IVoteService voteService =VoteUtils.getToolService(request); + logger.debug("voteAuthoringForm :" +voteAuthoringForm); + voteAuthoringForm.setExceptionMaxNominationInvalid(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); @@ -550,9 +563,11 @@ { VoteUtils.cleanUpUserExceptions(request); logger.debug("dispatching submitOnlineFiles..."); + VoteAuthoringForm voteAuthoringForm = (VoteAuthoringForm) form; + logger.debug("voteAuthoringForm :" +voteAuthoringForm); + voteAuthoringForm.setExceptionMaxNominationInvalid(new Boolean(false).toString()); request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0)); - VoteAuthoringForm voteAuthoringForm = (VoteAuthoringForm) form; IVoteService voteService =VoteUtils.getToolService(request); /* determine whether the request is from Monitoring url Edit Activity*/ @@ -600,9 +615,11 @@ { VoteUtils.cleanUpUserExceptions(request); logger.debug("dispatching deleteOfflineFile..."); + VoteAuthoringForm voteAuthoringForm = (VoteAuthoringForm) form; + logger.debug("voteAuthoringForm :" +voteAuthoringForm); + voteAuthoringForm.setExceptionMaxNominationInvalid(new Boolean(false).toString()); request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0)); - VoteAuthoringForm voteAuthoringForm = (VoteAuthoringForm) form; IVoteService voteService =VoteUtils.getToolService(request); /* determine whether the request is from Monitoring url Edit Activity*/ @@ -637,9 +654,11 @@ { VoteUtils.cleanUpUserExceptions(request); logger.debug("dispatching deleteOnlineFile..."); + VoteAuthoringForm voteAuthoringForm = (VoteAuthoringForm) form; + logger.debug("voteAuthoringForm :" +voteAuthoringForm); + voteAuthoringForm.setExceptionMaxNominationInvalid(new Boolean(false).toString()); request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0)); - VoteAuthoringForm voteAuthoringForm = (VoteAuthoringForm) form; IVoteService voteService =VoteUtils.getToolService(request); /* determine whether the request is from Monitoring url Edit Activity*/ @@ -673,9 +692,9 @@ ToolException { logger.debug("dispatching editActivityQuestions..."); - VoteAuthoringForm voteAuthoringForm = (VoteAuthoringForm) form; - logger.debug("voteAuthoringForm: " + voteAuthoringForm); + logger.debug("voteAuthoringForm :" +voteAuthoringForm); + voteAuthoringForm.setExceptionMaxNominationInvalid(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.6 -r1.7 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteAuthoringForm.java 24 Apr 2006 12:57:15 -0000 1.6 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteAuthoringForm.java 25 Apr 2006 10:52:46 -0000 1.7 @@ -98,6 +98,8 @@ protected String edit; + protected String exceptionMaxNominationInvalid; + public void resetUserAction() { this.editDefaultQuestion=null; @@ -727,4 +729,17 @@ public void setMaxNominationCount(String maxNominationCount) { this.maxNominationCount = maxNominationCount; } + /** + * @return Returns the exceptionMaxNominationInvalid. + */ + public String getExceptionMaxNominationInvalid() { + return exceptionMaxNominationInvalid; + } + /** + * @param exceptionMaxNominationInvalid The exceptionMaxNominationInvalid to set. + */ + public void setExceptionMaxNominationInvalid( + String exceptionMaxNominationInvalid) { + this.exceptionMaxNominationInvalid = exceptionMaxNominationInvalid; + } } Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningAction.java,v diff -u -r1.8 -r1.9 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningAction.java 24 Apr 2006 15:17:00 -0000 1.8 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningAction.java 25 Apr 2006 10:52:46 -0000 1.9 @@ -48,6 +48,7 @@ import org.lamsfoundation.lams.tool.vote.pojos.VoteContent; import org.lamsfoundation.lams.tool.vote.pojos.VoteQueContent; import org.lamsfoundation.lams.tool.vote.pojos.VoteQueUsr; +import org.lamsfoundation.lams.tool.vote.pojos.VoteSession; import org.lamsfoundation.lams.tool.vote.pojos.VoteUsrAttempt; import org.lamsfoundation.lams.tool.vote.service.IVoteService; import org.lamsfoundation.lams.web.action.LamsDispatchAction; @@ -111,8 +112,11 @@ HttpServletResponse response) throws IOException, ServletException { - VoteUtils.cleanUpUserExceptions(request); - VoteAuthoringForm voteAuthoringForm = (VoteAuthoringForm) form; + VoteLearningForm voteLearningForm = (VoteLearningForm) form; + voteLearningForm.setNominationsSubmited(new Boolean(false).toString()); + + VoteUtils.cleanUpUserExceptions(request); + VoteAuthoringForm voteAuthoringForm = (VoteAuthoringForm) form; IVoteService voteService =VoteUtils.getToolService(request); VoteUtils.persistRichText(request); voteAuthoringForm.resetUserAction(); @@ -128,10 +132,11 @@ { VoteUtils.cleanUpUserExceptions(request); logger.debug("dispatching viewAllResults..."); + VoteLearningForm voteLearningForm = (VoteLearningForm) form; + voteLearningForm.setNominationsSubmited(new Boolean(false).toString()); setContentInUse(request); - VoteLearningForm voteLearningForm = (VoteLearningForm) form; - IVoteService voteService =VoteUtils.getToolService(request); + IVoteService voteService =VoteUtils.getToolService(request); voteLearningForm.resetCommands(); return (mapping.findForward(ALL_NOMINATIONS)); @@ -147,39 +152,51 @@ VoteUtils.cleanUpUserExceptions(request); logger.debug("dispatching viewAnswers..."); - setContentInUse(request); VoteLearningForm voteLearningForm = (VoteLearningForm) form; + voteLearningForm.setNominationsSubmited(new Boolean(false).toString()); IVoteService voteService =VoteUtils.getToolService(request); + setContentInUse(request); - Long toolContentId=(Long) request.getSession().getAttribute(TOOL_CONTENT_ID); - logger.debug("toolContentId: " + toolContentId); + String isRevisitingUser=voteLearningForm.getRevisitingUser(); + logger.debug("isRevisitingUser: " + isRevisitingUser); + + if (isRevisitingUser.equals("true")) + { + logger.debug("this is a revisiting user, get the nominations from the db: " + isRevisitingUser); + Long toolContentId=(Long) request.getSession().getAttribute(TOOL_CONTENT_ID); + logger.debug("toolContentId: " + toolContentId); - VoteQueUsr voteQueUsr=LearningUtil.getUser(request); - logger.debug("voteQueUsr: " + voteQueUsr); + VoteQueUsr voteQueUsr=LearningUtil.getUser(request); + logger.debug("voteQueUsr: " + voteQueUsr); - List attempts=voteService.getAttemptsForUser(voteQueUsr.getUid()); - logger.debug("attempts: " + attempts); - - Map mapQuestionsContent= new TreeMap(new VoteComparator()); - Iterator listIterator=attempts.iterator(); - int order=0; - while (listIterator.hasNext()) - { - VoteUsrAttempt attempt=(VoteUsrAttempt)listIterator.next(); - logger.debug("attempt: " + attempt); - VoteQueContent voteQueContent=attempt.getVoteQueContent(); - logger.debug("voteQueContent: " + voteQueContent); - order++; - if (voteQueContent != null) - { - mapQuestionsContent.put(new Integer(order).toString(),voteQueContent.getQuestion()); - } - } - request.getSession().setAttribute(MAP_VIEWONLY_QUESTION_CONTENT_LEARNER, mapQuestionsContent); - logger.debug("MAP_VIEWONLY_QUESTION_CONTENT_LEARNER: " + request.getSession().getAttribute(MAP_VIEWONLY_QUESTION_CONTENT_LEARNER)); - - - voteLearningForm.resetCommands(); + List attempts=voteService.getAttemptsForUser(voteQueUsr.getUid()); + logger.debug("attempts: " + attempts); + + Map mapQuestionsContent= new TreeMap(new VoteComparator()); + Iterator listIterator=attempts.iterator(); + int order=0; + while (listIterator.hasNext()) + { + VoteUsrAttempt attempt=(VoteUsrAttempt)listIterator.next(); + logger.debug("attempt: " + attempt); + VoteQueContent voteQueContent=attempt.getVoteQueContent(); + logger.debug("voteQueContent: " + voteQueContent); + order++; + if (voteQueContent != null) + { + mapQuestionsContent.put(new Integer(order).toString(),voteQueContent.getQuestion()); + } + } + //request.getSession().setAttribute(MAP_VIEWONLY_QUESTION_CONTENT_LEARNER, mapQuestionsContent); + //logger.debug("MAP_VIEWONLY_QUESTION_CONTENT_LEARNER: " + request.getSession().getAttribute(MAP_VIEWONLY_QUESTION_CONTENT_LEARNER)); + request.getSession().setAttribute(MAP_GENERAL_CHECKED_OPTIONS_CONTENT, mapQuestionsContent); + } + else + { + logger.debug("this is not a revisiting user: " + isRevisitingUser); + } + + voteLearningForm.resetCommands(); logger.debug("fwd'ing to : " + VIEW_ANSWERS); return (mapping.findForward(VIEW_ANSWERS)); } @@ -195,6 +212,7 @@ logger.debug("dispatching redoQuestionsOk..."); VoteLearningForm voteLearningForm = (VoteLearningForm) form; + voteLearningForm.setNominationsSubmited(new Boolean(false).toString()); IVoteService voteService =VoteUtils.getToolService(request); @@ -215,6 +233,7 @@ logger.debug("requested learner finished, the learner should be directed to next activity."); VoteLearningForm voteLearningForm = (VoteLearningForm) form; + voteLearningForm.setNominationsSubmited(new Boolean(false).toString()); IVoteService voteService =VoteUtils.getToolService(request); Long toolSessionId = (Long) request.getSession().getAttribute(TOOL_SESSION_ID); @@ -223,6 +242,17 @@ VoteUtils.cleanUpSessionAbsolute(request); + + /*this section is temorarrily here, from here... */ + VoteSession voteSession=null; + voteSession=voteService.retrieveVoteSession(toolSessionId); + logger.debug("retrieved voteSession: " + voteSession); + voteSession.setSessionStatus(COMPLETED); + voteService.updateVoteSession(voteSession); + logger.debug("updated voteSession to COMPLETED" + voteSession); + /*...till here... */ + + String nextUrl=null; try { @@ -261,8 +291,23 @@ return null; } + + public ActionForward nominateVotes(ActionMapping mapping, + ActionForm form, + HttpServletRequest request, + HttpServletResponse response) throws IOException, + ServletException + { + VoteUtils.cleanUpUserExceptions(request); + logger.debug("dispatching nominateVotes..."); + + VoteLearningForm voteLearningForm = (VoteLearningForm) form; + voteLearningForm.setNominationsSubmited(new Boolean(false).toString()); + IVoteService voteService =VoteUtils.getToolService(request); + return (mapping.findForward(INDIVIDUAL_REPORT)); + } + - public ActionForward continueOptionsCombined(ActionMapping mapping, ActionForm form, HttpServletRequest request, @@ -272,13 +317,12 @@ VoteUtils.cleanUpUserExceptions(request); logger.debug("dispatching continueOptionsCombined..."); - setContentInUse(request); VoteLearningForm voteLearningForm = (VoteLearningForm) form; + voteLearningForm.setNominationsSubmited(new Boolean(false).toString()); IVoteService voteService =VoteUtils.getToolService(request); - - /* process the answers */ - Map mapGeneralCheckedOptionsContent=(Map) request.getSession().getAttribute(MAP_GENERAL_CHECKED_OPTIONS_CONTENT); + setContentInUse(request); + Map mapGeneralCheckedOptionsContent=(Map) request.getSession().getAttribute(MAP_GENERAL_CHECKED_OPTIONS_CONTENT); logger.debug("final mapGeneralCheckedOptionsContent: " + mapGeneralCheckedOptionsContent); Long toolContentId=(Long) request.getSession().getAttribute(TOOL_CONTENT_ID); @@ -374,8 +418,10 @@ mapGeneralCheckedOptionsContent=(Map) request.getSession().getAttribute(MAP_GENERAL_CHECKED_OPTIONS_CONTENT); logger.debug("final mapGeneralCheckedOptionsContent: " + mapGeneralCheckedOptionsContent); - - return (mapping.findForward(INDIVIDUAL_REPORT)); + + voteLearningForm.setNominationsSubmited(new Boolean(true).toString()); + logger.debug("fwd ing to: " + ALL_NOMINATIONS); + return (mapping.findForward(ALL_NOMINATIONS)); } public ActionForward redoQuestions(ActionMapping mapping, @@ -387,6 +433,7 @@ logger.debug("dispatching redoQuestions..."); VoteUtils.cleanUpUserExceptions(request); VoteLearningForm voteLearningForm = (VoteLearningForm) form; + voteLearningForm.setNominationsSubmited(new Boolean(false).toString()); IVoteService voteService =VoteUtils.getToolService(request); Long toolContentId=(Long)request.getSession().getAttribute(TOOL_CONTENT_ID); @@ -432,6 +479,7 @@ logger.debug("dispatching selectOption..."); VoteUtils.cleanUpUserExceptions(request); VoteLearningForm voteLearningForm = (VoteLearningForm) form; + voteLearningForm.setNominationsSubmited(new Boolean(false).toString()); IVoteService voteService =VoteUtils.getToolService(request); voteLearningForm.resetParameters(); 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.7 -r1.8 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningForm.java 23 Apr 2006 20:10:45 -0000 1.7 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningForm.java 25 Apr 2006 10:52:46 -0000 1.8 @@ -52,6 +52,8 @@ protected String continueOptions; protected String nextOptions; + protected String nominateVotes; + protected String continueOptionsCombined; protected String redoQuestions; protected String viewSummary; @@ -62,6 +64,7 @@ protected String doneLearnerProgress; protected String viewAllResults; + protected String responseId; protected String method; protected String answer; protected String currentQuestionIndex; @@ -70,8 +73,10 @@ protected String getPreviousQuestion; protected String endLearning; + protected String nominationsSubmited; + protected String revisitingUser; - protected void resetUserActions() + protected void resetUserActions() { this.getNextQuestion=null; this.getPreviousQuestion=null; @@ -176,12 +181,8 @@ public void setSubmitAnswersContent(String submitAnswersContent) { this.submitAnswersContent = submitAnswersContent; } - protected String responseId; - - - - + public void resetCommands() { this.setContinueOptions(null); @@ -538,4 +539,44 @@ public void setMaxNominationCount(String maxNominationCount) { this.maxNominationCount = maxNominationCount; } + /** + * @return Returns the nominateVotes. + */ + public String getNominateVotes() { + return nominateVotes; + } + /** + * @param nominateVotes The nominateVotes to set. + */ + public void setNominateVotes(String nominateVotes) { + this.nominateVotes = nominateVotes; + } + + + /** + * @return Returns the nominationsSubmited. + */ + public String getNominationsSubmited() { + return nominationsSubmited; + } + /** + * @param nominationsSubmited The nominationsSubmited to set. + */ + public void setNominationsSubmited(String nominationsSubmited) { + this.nominationsSubmited = nominationsSubmited; + } + + /** + * @return Returns the revisitingUser. + */ + public String getRevisitingUser() { + return revisitingUser; + } + /** + * @param revisitingUser The revisitingUser to set. + */ + public void setRevisitingUser(String revisitingUser) { + this.revisitingUser = revisitingUser; + } + } Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningStarterAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningStarterAction.java,v diff -u -r1.5 -r1.6 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningStarterAction.java 24 Apr 2006 12:57:15 -0000 1.5 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningStarterAction.java 25 Apr 2006 10:52:46 -0000 1.6 @@ -126,7 +126,7 @@ } VoteLearningForm voteLearningForm = (VoteLearningForm) form; - + voteLearningForm.setRevisitingUser(new Boolean(false).toString()); /* * persist time zone information to session scope. */ @@ -390,6 +390,8 @@ logger.debug("the user's session id AND user id exists in the tool tables go to redo questions. " + toolSessionId + " voteQueUsr: " + voteQueUsr + " user id: " + voteQueUsr.getQueUsrId()); logger.debug("the learner has already responsed to this content, just generate a read-only report. Use redo questions for this."); + + voteLearningForm.setRevisitingUser(new Boolean(true).toString()); return (mapping.findForward(REDO_QUESTIONS)); } } 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.13 -r1.14 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteStarterAction.java 24 Apr 2006 12:57:15 -0000 1.13 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteStarterAction.java 25 Apr 2006 10:52:46 -0000 1.14 @@ -124,6 +124,7 @@ logger.debug("retrieving voteService from cache: " + voteService); } request.getSession().setAttribute(TOOL_SERVICE, voteService); + request.getSession().setAttribute(SUBMIT_SUCCESS, new Integer(0)); String servletPath=request.getServletPath(); logger.debug("getServletPath: "+ servletPath); @@ -153,6 +154,7 @@ VoteAuthoringForm voteAuthoringForm = (VoteAuthoringForm) form; voteAuthoringForm.resetRadioBoxes(); + voteAuthoringForm.setExceptionMaxNominationInvalid(new Boolean(false).toString()); ActionForward validateSignature=readSignature(request,mapping); logger.debug("validateSignature: " + validateSignature); Index: lams_tool_vote/web/authoring/AuthoringMaincontent.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/web/authoring/AuthoringMaincontent.jsp,v diff -u -r1.6 -r1.7 --- lams_tool_vote/web/authoring/AuthoringMaincontent.jsp 19 Apr 2006 12:37:00 -0000 1.6 +++ lams_tool_vote/web/authoring/AuthoringMaincontent.jsp 25 Apr 2006 10:52:46 -0000 1.7 @@ -51,7 +51,7 @@ - <bean:message key="label.authoring"/> + <bean:message key="activity.title"/> Index: lams_tool_vote/web/authoring/BasicContent.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/web/authoring/BasicContent.jsp,v diff -u -r1.10 -r1.11 --- lams_tool_vote/web/authoring/BasicContent.jsp 24 Apr 2006 15:17:00 -0000 1.10 +++ lams_tool_vote/web/authoring/BasicContent.jsp 25 Apr 2006 10:52:46 -0000 1.11 @@ -39,7 +39,8 @@ images/success.gif" align="left" width=20 height=20> - + + images/error.jpg" align="left" width=20 height=20> @@ -62,7 +63,6 @@ - Index: lams_tool_vote/web/learning/AllNominations.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/web/learning/AllNominations.jsp,v diff -u -r1.1 -r1.2 --- lams_tool_vote/web/learning/AllNominations.jsp 24 Apr 2006 12:57:15 -0000 1.1 +++ lams_tool_vote/web/learning/AllNominations.jsp 25 Apr 2006 10:52:45 -0000 1.2 @@ -47,6 +47,15 @@ + + + + images/success.gif" align="left" width=20 height=20> + + + + + @@ -71,6 +80,12 @@       + + + +       Index: lams_tool_vote/web/learning/AnswersContent.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/web/learning/AnswersContent.jsp,v diff -u -r1.4 -r1.5 --- lams_tool_vote/web/learning/AnswersContent.jsp 24 Apr 2006 12:57:15 -0000 1.4 +++ lams_tool_vote/web/learning/AnswersContent.jsp 25 Apr 2006 10:52:46 -0000 1.5 @@ -51,13 +51,13 @@ - + - + @@ -96,10 +96,8 @@ - - - - + + @@ -130,10 +128,7 @@ - - - - + @@ -163,10 +158,10 @@ - - + onclick="submitMethod('nominateVotes');"> + Index: lams_tool_vote/web/learning/IndividualLearnerResults.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/web/learning/IndividualLearnerResults.jsp,v diff -u -r1.4 -r1.5 --- lams_tool_vote/web/learning/IndividualLearnerResults.jsp 24 Apr 2006 12:57:15 -0000 1.4 +++ lams_tool_vote/web/learning/IndividualLearnerResults.jsp 25 Apr 2006 10:52:46 -0000 1.5 @@ -39,7 +39,7 @@ - + Index: lams_tool_vote/web/learning/RedoQuestions.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/web/learning/Attic/RedoQuestions.jsp,v diff -u -r1.2 -r1.3 --- lams_tool_vote/web/learning/RedoQuestions.jsp 24 Apr 2006 12:57:15 -0000 1.2 +++ lams_tool_vote/web/learning/RedoQuestions.jsp 25 Apr 2006 10:52:46 -0000 1.3 @@ -71,11 +71,13 @@       - - - + + + + + Index: lams_tool_vote/web/learning/ViewAnswers.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/web/learning/Attic/ViewAnswers.jsp,v diff -u -r1.2 -r1.3 --- lams_tool_vote/web/learning/ViewAnswers.jsp 24 Apr 2006 12:57:15 -0000 1.2 +++ lams_tool_vote/web/learning/ViewAnswers.jsp 25 Apr 2006 10:52:45 -0000 1.3 @@ -44,7 +44,7 @@ @@ -54,7 +54,7 @@ - +
- +
@@ -66,11 +66,21 @@
- - - + + + + + + + + + + +