Index: lams_tool_vote/conf/language/ApplicationResources.properties
===================================================================
diff -u -r9656fbcdd18cc51826a0a61a1bf93bdba249fdc7 -r865d01f017c6e40ee98ae2e61d5bbbe49b2a5851
--- lams_tool_vote/conf/language/ApplicationResources.properties (.../ApplicationResources.properties) (revision 9656fbcdd18cc51826a0a61a1bf93bdba249fdc7)
+++ lams_tool_vote/conf/language/ApplicationResources.properties (.../ApplicationResources.properties) (revision 865d01f017c6e40ee98ae2e61d5bbbe49b2a5851)
@@ -51,7 +51,7 @@
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 your nominations..
+label.learning.reportMessage =Thank you for your participation!
The following is your nominations.
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:
@@ -110,6 +110,7 @@
option.off =OFF
label.save =Save
label.cancel =Cancel
+label.choose.nominations =Please choose your nominations.
feedback =Please address the following issues before submit.
error.maxNominationCount.invalid =Please correct this: The "Max Nominations" field in Advanced section is invalid.
Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningAction.java
===================================================================
diff -u -r9656fbcdd18cc51826a0a61a1bf93bdba249fdc7 -r865d01f017c6e40ee98ae2e61d5bbbe49b2a5851
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningAction.java (.../VoteLearningAction.java) (revision 9656fbcdd18cc51826a0a61a1bf93bdba249fdc7)
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningAction.java (.../VoteLearningAction.java) (revision 865d01f017c6e40ee98ae2e61d5bbbe49b2a5851)
@@ -48,7 +48,6 @@
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;
@@ -117,6 +116,8 @@
VoteUtils.cleanUpUserExceptions(request);
VoteAuthoringForm voteAuthoringForm = (VoteAuthoringForm) form;
+ voteLearningForm.setRevisitingPageActive(new Boolean(false).toString());
+
IVoteService voteService =VoteUtils.getToolService(request);
VoteUtils.persistRichText(request);
voteAuthoringForm.resetUserAction();
@@ -133,6 +134,7 @@
VoteUtils.cleanUpUserExceptions(request);
logger.debug("dispatching viewAllResults...");
VoteLearningForm voteLearningForm = (VoteLearningForm) form;
+ voteLearningForm.setRevisitingPageActive(new Boolean(false).toString());
voteLearningForm.setNominationsSubmited(new Boolean(false).toString());
setContentInUse(request);
@@ -153,6 +155,7 @@
logger.debug("dispatching viewAnswers...");
VoteLearningForm voteLearningForm = (VoteLearningForm) form;
+ voteLearningForm.setRevisitingPageActive(new Boolean(false).toString());
voteLearningForm.setNominationsSubmited(new Boolean(false).toString());
IVoteService voteService =VoteUtils.getToolService(request);
setContentInUse(request);
@@ -187,8 +190,6 @@
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
@@ -212,6 +213,7 @@
logger.debug("dispatching redoQuestionsOk...");
VoteLearningForm voteLearningForm = (VoteLearningForm) form;
+ voteLearningForm.setRevisitingPageActive(new Boolean(false).toString());
voteLearningForm.setNominationsSubmited(new Boolean(false).toString());
IVoteService voteService =VoteUtils.getToolService(request);
@@ -233,6 +235,7 @@
logger.debug("requested learner finished, the learner should be directed to next activity.");
VoteLearningForm voteLearningForm = (VoteLearningForm) form;
+ voteLearningForm.setRevisitingPageActive(new Boolean(false).toString());
voteLearningForm.setNominationsSubmited(new Boolean(false).toString());
IVoteService voteService =VoteUtils.getToolService(request);
@@ -242,17 +245,7 @@
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
{
@@ -302,6 +295,7 @@
logger.debug("dispatching nominateVotes...");
VoteLearningForm voteLearningForm = (VoteLearningForm) form;
+ voteLearningForm.setRevisitingPageActive(new Boolean(false).toString());
voteLearningForm.setNominationsSubmited(new Boolean(false).toString());
IVoteService voteService =VoteUtils.getToolService(request);
return (mapping.findForward(INDIVIDUAL_REPORT));
@@ -318,6 +312,7 @@
logger.debug("dispatching continueOptionsCombined...");
VoteLearningForm voteLearningForm = (VoteLearningForm) form;
+ voteLearningForm.setRevisitingPageActive(new Boolean(false).toString());
voteLearningForm.setNominationsSubmited(new Boolean(false).toString());
IVoteService voteService =VoteUtils.getToolService(request);
@@ -356,22 +351,29 @@
int intMaxNominationCount=0;
if (maxNominationCount != null)
intMaxNominationCount=new Integer(maxNominationCount).intValue();
-
logger.debug("intMaxNominationCount: " + intMaxNominationCount);
-
- int nominationCount=voteService.getLastNominationCount(voteQueUsr.getUid());
- logger.debug("current nominationCount: " + nominationCount);
-
-
+ int nominationCount=0;
if (intMaxNominationCount != 0)
{
- if (nominationCount >= intMaxNominationCount)
- {
- logger.debug("max nom count reached...");
- logger.debug("fwd'ing to: " + EXIT_PAGE);
- return (mapping.findForward(EXIT_PAGE));
- }
+ nominationCount=voteService.getLastNominationCount(voteQueUsr.getUid());
+ logger.debug("current nominationCount: " + nominationCount);
+
+ Long toolSessionId=(Long)request.getSession().getAttribute(TOOL_SESSION_ID);
+ logger.debug("current toolSessionId: " + toolSessionId);
+ logger.debug("current user's voteSession: " + voteQueUsr.getVoteSession());
+ logger.debug("current user's toolSessionId: " + voteQueUsr.getVoteSession().getVoteSessionId());
+
+ if (voteQueUsr.getVoteSession().getVoteSessionId().toString().equals(toolSessionId.toString()))
+ {
+ if (nominationCount >= intMaxNominationCount)
+ {
+ logger.debug("this is a the same user.");
+ logger.debug("max nom count reached...");
+ logger.debug("fwd'ing to: " + EXIT_PAGE);
+ return (mapping.findForward(EXIT_PAGE));
+ }
+ }
}
int newNominationCount=nominationCount+1;
@@ -433,6 +435,7 @@
logger.debug("dispatching redoQuestions...");
VoteUtils.cleanUpUserExceptions(request);
VoteLearningForm voteLearningForm = (VoteLearningForm) form;
+ voteLearningForm.setRevisitingPageActive(new Boolean(false).toString());
voteLearningForm.setNominationsSubmited(new Boolean(false).toString());
IVoteService voteService =VoteUtils.getToolService(request);
@@ -479,6 +482,7 @@
logger.debug("dispatching selectOption...");
VoteUtils.cleanUpUserExceptions(request);
VoteLearningForm voteLearningForm = (VoteLearningForm) form;
+ voteLearningForm.setRevisitingPageActive(new Boolean(false).toString());
voteLearningForm.setNominationsSubmited(new Boolean(false).toString());
IVoteService voteService =VoteUtils.getToolService(request);
Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningForm.java
===================================================================
diff -u -rb31ec6e6d35cd7a66c2560b16a2943c643fb46aa -r865d01f017c6e40ee98ae2e61d5bbbe49b2a5851
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningForm.java (.../VoteLearningForm.java) (revision b31ec6e6d35cd7a66c2560b16a2943c643fb46aa)
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningForm.java (.../VoteLearningForm.java) (revision 865d01f017c6e40ee98ae2e61d5bbbe49b2a5851)
@@ -75,6 +75,7 @@
protected String nominationsSubmited;
protected String revisitingUser;
+ protected String revisitingPageActive;
protected void resetUserActions()
{
@@ -578,5 +579,17 @@
public void setRevisitingUser(String revisitingUser) {
this.revisitingUser = revisitingUser;
}
+ /**
+ * @return Returns the revisitingPageActive.
+ */
+ public String getRevisitingPageActive() {
+ return revisitingPageActive;
+ }
+ /**
+ * @param revisitingPageActive The revisitingPageActive to set.
+ */
+ public void setRevisitingPageActive(String revisitingPageActive) {
+ this.revisitingPageActive = revisitingPageActive;
+ }
}
Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningStarterAction.java
===================================================================
diff -u -rf3a1931cc8c0a7c20d6d19dd00fdf719c9d055a7 -r865d01f017c6e40ee98ae2e61d5bbbe49b2a5851
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningStarterAction.java (.../VoteLearningStarterAction.java) (revision f3a1931cc8c0a7c20d6d19dd00fdf719c9d055a7)
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningStarterAction.java (.../VoteLearningStarterAction.java) (revision 865d01f017c6e40ee98ae2e61d5bbbe49b2a5851)
@@ -131,6 +131,7 @@
VoteLearningForm voteLearningForm = (VoteLearningForm) form;
voteLearningForm.setRevisitingUser(new Boolean(false).toString());
+ voteLearningForm.setRevisitingPageActive(new Boolean(false).toString());
voteLearningForm.setUserEntry("");
/*
* persist time zone information to session scope.
@@ -397,6 +398,7 @@
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());
+ voteLearningForm.setRevisitingPageActive(new Boolean(true).toString());
logger.debug("start building MAP_GENERAL_CHECKED_OPTIONS_CONTENT");
Long toolContentId=(Long) request.getSession().getAttribute(TOOL_CONTENT_ID);
Index: lams_tool_vote/web/learning/AllNominations.jsp
===================================================================
diff -u -rf3a1931cc8c0a7c20d6d19dd00fdf719c9d055a7 -r865d01f017c6e40ee98ae2e61d5bbbe49b2a5851
--- lams_tool_vote/web/learning/AllNominations.jsp (.../AllNominations.jsp) (revision f3a1931cc8c0a7c20d6d19dd00fdf719c9d055a7)
+++ lams_tool_vote/web/learning/AllNominations.jsp (.../AllNominations.jsp) (revision 865d01f017c6e40ee98ae2e61d5bbbe49b2a5851)
@@ -107,7 +107,8 @@
-
+
+
-
+
@@ -126,7 +127,6 @@
     
-
Index: lams_tool_vote/web/learning/AnswersContent.jsp
===================================================================
diff -u -r9656fbcdd18cc51826a0a61a1bf93bdba249fdc7 -r865d01f017c6e40ee98ae2e61d5bbbe49b2a5851
--- lams_tool_vote/web/learning/AnswersContent.jsp (.../AnswersContent.jsp) (revision 9656fbcdd18cc51826a0a61a1bf93bdba249fdc7)
+++ lams_tool_vote/web/learning/AnswersContent.jsp (.../AnswersContent.jsp) (revision 865d01f017c6e40ee98ae2e61d5bbbe49b2a5851)
@@ -49,6 +49,12 @@
+
+
+
+ |
+
+
|