Index: lams_tool_vote/build.properties =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/build.properties,v diff -u -r1.15 -r1.16 --- lams_tool_vote/build.properties 26 Jul 2009 22:21:11 -0000 1.15 +++ lams_tool_vote/build.properties 17 Mar 2010 10:50:00 -0000 1.16 @@ -4,7 +4,7 @@ signature=lavote11 #project version -tool.version=20090726 +tool.version=20100309 # hide tool option hideTool=false Index: lams_tool_vote/build.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/build.xml,v diff -u -r1.21 -r1.22 --- lams_tool_vote/build.xml 23 Sep 2008 04:21:26 -0000 1.21 +++ lams_tool_vote/build.xml 17 Mar 2010 10:50:00 -0000 1.22 @@ -537,5 +537,21 @@ - + + + + + + + + + + + + + + + + + \ No newline at end of file Index: lams_tool_vote/conf/hibernate/mappings/org/lamsfoundation/lams/tool/vote/VoteContent.hbm.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/conf/hibernate/mappings/org/lamsfoundation/lams/tool/vote/Attic/VoteContent.hbm.xml,v diff -u -r1.12 -r1.13 --- lams_tool_vote/conf/hibernate/mappings/org/lamsfoundation/lams/tool/vote/VoteContent.hbm.xml 14 Aug 2009 11:26:25 -0000 1.12 +++ lams_tool_vote/conf/hibernate/mappings/org/lamsfoundation/lams/tool/vote/VoteContent.hbm.xml 17 Mar 2010 10:50:00 -0000 1.13 @@ -150,6 +150,14 @@ column="maxNominationCount" length="5" /> + + voteDisplayOrderIds = voteLearningForm.votesAsCollection(); logger.debug("Checkbox votes " + voteDisplayOrderIds); @@ -968,6 +983,10 @@ String maxNominationCount = request.getParameter(MAX_NOMINATION_COUNT); logger.debug("maxNominationCount: " + maxNominationCount); voteLearningForm.setMaxNominationCount(maxNominationCount); + + String minNominationCount = request.getParameter(MIN_NOMINATION_COUNT); + logger.debug("minNominationCount: " + minNominationCount); + voteLearningForm.setMinNominationCount(minNominationCount); String allowTextEntry = request.getParameter(ALLOW_TEXT_ENTRY); logger.debug("allowTextEntry: " + allowTextEntry); 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.24 -r1.25 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningForm.java 26 Mar 2008 03:57:40 -0000 1.24 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningForm.java 17 Mar 2010 10:49:00 -0000 1.25 @@ -52,6 +52,7 @@ protected String toolContentID; protected String maxNominationCount; + protected String minNominationCount; protected String allowTextEntry; protected String showResults; protected String lockOnFinish; @@ -90,6 +91,7 @@ protected String nominationsSubmited; protected String revisitingUser; protected String maxNominationCountReached; + protected String minNominationCountReached; protected int castVoteCount; protected Map mapGeneralCheckedOptionsContent; @@ -577,6 +579,18 @@ public void setMaxNominationCount(String maxNominationCount) { this.maxNominationCount = maxNominationCount; } + /** + * @return Returns the minNominationCount. + */ + public String getMinNominationCount() { + return minNominationCount; + } + /** + * @param minNominationCount The minNominationCount to set. + */ + public void setMinNominationCount(String minNominationCount) { + this.minNominationCount = minNominationCount; + } /** * @return Returns the nominationsSubmited. @@ -641,6 +655,18 @@ public void setMaxNominationCountReached(String maxNominationCountReached) { this.maxNominationCountReached = maxNominationCountReached; } + /** + * @return Returns the minNominationCountReached. + */ + public String getMinNominationCountReached() { + return minNominationCountReached; + } + /** + * @param minNominationCountReached The minNominationCountReached to set. + */ + public void setMinNominationCountReached(String minNominationCountReached) { + this.minNominationCountReached = minNominationCountReached; + } /** * @return Returns the sbmtSuccess. 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.47 -r1.48 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningStarterAction.java 2 Jul 2009 13:02:04 -0000 1.47 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningStarterAction.java 17 Mar 2010 10:49:00 -0000 1.48 @@ -633,6 +633,7 @@ voteLearningForm.setActivityInstructions(voteContent.getInstructions()); voteLearningForm.setActivityRunOffline(new Boolean(voteContent.isRunOffline()).toString()); voteLearningForm.setMaxNominationCount(voteContent.getMaxNominationCount()); + voteLearningForm.setMinNominationCount(voteContent.getMinNominationCount()); voteLearningForm.setAllowTextEntry(new Boolean(voteContent.isAllowText()).toString()); voteLearningForm.setShowResults(new Boolean(voteContent.isShowResults()).toString()); voteLearningForm.setLockOnFinish(new Boolean(voteContent.isLockOnFinish()).toString()); @@ -641,6 +642,7 @@ voteGeneralLearnerFlowDTO.setActivityInstructions(voteContent.getInstructions()); voteGeneralLearnerFlowDTO.setActivityRunOffline(new Boolean(voteContent.isRunOffline()).toString()); voteGeneralLearnerFlowDTO.setMaxNominationCount(voteContent.getMaxNominationCount()); + voteGeneralLearnerFlowDTO.setMinNominationCount(voteContent.getMinNominationCount()); voteGeneralLearnerFlowDTO.setAllowTextEntry(new Boolean(voteContent.isAllowText()).toString()); voteGeneralLearnerFlowDTO.setLockOnFinish(new Boolean(voteContent.isLockOnFinish()).toString()); voteGeneralLearnerFlowDTO.setActivityTitle(voteContent.getTitle()); 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.36 -r1.37 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringStarterAction.java 21 Jul 2008 06:13:10 -0000 1.36 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringStarterAction.java 17 Mar 2010 10:49:00 -0000 1.37 @@ -389,6 +389,7 @@ request.setAttribute("lockOnFinish", voteContent.isLockOnFinish()); request.setAttribute("allowText", voteContent.isAllowText()); request.setAttribute("maxNominationCount", voteContent.getMaxNominationCount()); + request.setAttribute("minNominationCount", voteContent.getMinNominationCount()); request.setAttribute("showResults", voteContent.isShowResults()); request.setAttribute("reflect", voteContent.isReflect()); request.setAttribute("reflectionSubject", voteContent.getReflectionSubject()); Index: lams_tool_vote/web/authoring/AdvancedContent.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/web/authoring/AdvancedContent.jsp,v diff -u -r1.26 -r1.27 --- lams_tool_vote/web/authoring/AdvancedContent.jsp 26 Jul 2009 22:21:10 -0000 1.26 +++ lams_tool_vote/web/authoring/AdvancedContent.jsp 17 Mar 2010 10:49:59 -0000 1.27 @@ -37,34 +37,25 @@

- +

+

+   + + +

- - +    + +

- -

- - - - - - - ${index} - - -

-
-

@@ -73,7 +64,6 @@

-

Index: lams_tool_vote/web/authoring/AuthoringMaincontent.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/web/authoring/AuthoringMaincontent.jsp,v diff -u -r1.33 -r1.34 --- lams_tool_vote/web/authoring/AuthoringMaincontent.jsp 26 Jul 2009 22:21:10 -0000 1.33 +++ lams_tool_vote/web/authoring/AuthoringMaincontent.jsp 17 Mar 2010 10:49:59 -0000 1.34 @@ -79,28 +79,67 @@ var tag = document.getElementById("currentTab"); tag.value = tabId; selectTab(tabId); + + //for advanceTab + if(tabId == 2) { + changeMinMaxVotes(-1, -1); + } } + + function changeMinMaxVotes(maxNominationCount, minNominationCount) { + processSelect("maxNominationCount", maxNominationCount); + processSelect("minNominationCount", minNominationCount); + } + + function processSelect(id, initSelectedItem) { + var table = document.getElementById("itemTable"); + var trs = table.getElementsByTagName("tr"); + var select = document.getElementById(id); + var options = select.options; + var numberOptions = select.length; + + //when first enter, it should get value from VoteContent + var selectedItem = (initSelectedItem < 0) ? -1 : initSelectedItem; + for (var i = 0; i < numberOptions; i++) { + if(options[0].selected && selectedItem == -1 ){ + selectedItem = options[0].value; + } + select.removeChild(options[0]); + } + + var isTextAllowed = document.getElementById("allowText").checked ? 1 : 0; + for(var i = 1; i <= (trs.length+isTextAllowed); i++){ + var opt = document.createElement("option"); + var optT = document.createTextNode(i); + opt.value = i; + //get back user choosen value + if(selectedItem > 0 && selectedItem == i){ + opt.selected = true; + } else { + opt.selected = false; + } + opt.appendChild(optT); + select.appendChild(opt); + } + } function doSubmit(method) { document.VoteAuthoringForm.dispatch.value=method; document.VoteAuthoringForm.submit(); } - function submitModifyNomination(optionIndexValue, actionMethod) { document.VoteAuthoringForm.optIndex.value=optionIndexValue; submitMethod(actionMethod); } - function submitModifyAuthoringNomination(questionIndexValue, actionMethod) { document.VoteAuthoringForm.questionIndex.value=questionIndexValue; submitMethod(actionMethod); } - function submitMethod(actionMethod) { document.VoteAuthoringForm.dispatch.value=actionMethod; @@ -140,6 +179,7 @@

+ @@ -166,7 +206,6 @@ - @@ -186,10 +225,13 @@
- - + Index: lams_tool_vote/web/authoring/BasicContent.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/web/authoring/BasicContent.jsp,v diff -u -r1.44 -r1.45 --- lams_tool_vote/web/authoring/BasicContent.jsp 28 Jul 2009 18:10:00 -0000 1.44 +++ lams_tool_vote/web/authoring/BasicContent.jsp 17 Mar 2010 10:49:59 -0000 1.45 @@ -30,7 +30,6 @@