Index: lams_tool_vote/build.properties =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/build.properties,v diff -u -r1.14 -r1.14.8.1 --- lams_tool_vote/build.properties 9 Dec 2008 05:38:14 -0000 1.14 +++ lams_tool_vote/build.properties 10 Mar 2010 15:01:22 -0000 1.14.8.1 @@ -4,7 +4,7 @@ signature=lavote11 #project version -tool.version=20081203 +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.21.10.1 --- lams_tool_vote/build.xml 23 Sep 2008 04:21:26 -0000 1.21 +++ lams_tool_vote/build.xml 10 Mar 2010 15:01:22 -0000 1.21.10.1 @@ -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.9 -r1.9.10.1 --- lams_tool_vote/conf/hibernate/mappings/org/lamsfoundation/lams/tool/vote/VoteContent.hbm.xml 26 Mar 2008 04:08:22 -0000 1.9 +++ lams_tool_vote/conf/hibernate/mappings/org/lamsfoundation/lams/tool/vote/VoteContent.hbm.xml 10 Mar 2010 14:59:04 -0000 1.9.10.1 @@ -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.24.10.1 --- 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 10 Mar 2010 15:02:10 -0000 1.24.10.1 @@ -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.46 -r1.46.10.1 --- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningStarterAction.java 13 May 2008 03:44:34 -0000 1.46 +++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningStarterAction.java 10 Mar 2010 15:02:10 -0000 1.46.10.1 @@ -628,6 +628,7 @@ logger.debug("IS_TOOL_ACTIVITY_OFFLINE: " + voteContent.isRunOffline()); logger.debug("advanced properties maxNominationCount: " + voteContent.getMaxNominationCount()); + logger.debug("advanced properties minNominationCount: " + voteContent.getMinNominationCount()); logger.debug("advanced properties isAllowText(): " + new Boolean(voteContent.isAllowText()).toString()); logger.debug("advanced properties isRunOffline(): " + new Boolean(voteContent.isRunOffline()).toString()); logger.debug("advanced properties isLockOnFinish(): " + new Boolean(voteContent.isLockOnFinish()).toString()); @@ -637,6 +638,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()); @@ -645,6 +647,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.36.10.1 --- 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 10 Mar 2010 15:02:10 -0000 1.36.10.1 @@ -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.25 -r1.25.10.1 --- lams_tool_vote/web/authoring/AdvancedContent.jsp 26 Mar 2008 04:08:48 -0000 1.25 +++ lams_tool_vote/web/authoring/AdvancedContent.jsp 10 Mar 2010 15:00:57 -0000 1.25.10.1 @@ -44,10 +44,16 @@

+

+   + + +

- - +    + +

@@ -58,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.32 -r1.32.10.1 --- lams_tool_vote/web/authoring/AuthoringMaincontent.jsp 8 Jun 2007 01:43:32 -0000 1.32 +++ lams_tool_vote/web/authoring/AuthoringMaincontent.jsp 10 Mar 2010 15:00:57 -0000 1.32.10.1 @@ -74,28 +74,66 @@ 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]); + } + + for(var i = 1; i <= trs.length; 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; @@ -135,6 +173,7 @@

+ @@ -161,7 +200,6 @@ - @@ -181,10 +219,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.41 -r1.41.12.1 --- lams_tool_vote/web/authoring/BasicContent.jsp 23 Nov 2006 07:07:28 -0000 1.41 +++ lams_tool_vote/web/authoring/BasicContent.jsp 10 Mar 2010 15:00:58 -0000 1.41.12.1 @@ -116,14 +116,14 @@ ');" + href="javascript:showMessage('');" class="button-add-item"> ');" + href="javascript:showMessage('');" class="button-add-item"> 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.19 -r1.19.10.1 --- lams_tool_vote/web/authoring/InstructionsContent.jsp 6 May 2008 02:50:05 -0000 1.19 +++ lams_tool_vote/web/authoring/InstructionsContent.jsp 10 Mar 2010 15:00:59 -0000 1.19.10.1 @@ -56,7 +56,7 @@   @@ -119,7 +119,7 @@   Index: lams_tool_vote/web/authoring/itemlist.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/web/authoring/itemlist.jsp,v diff -u -r1.7 -r1.7.12.1 --- lams_tool_vote/web/authoring/itemlist.jsp 23 Nov 2006 07:07:28 -0000 1.7 +++ lams_tool_vote/web/authoring/itemlist.jsp 10 Mar 2010 15:00:57 -0000 1.7.12.1 @@ -87,7 +87,7 @@ images/edit.gif" border="0" title="" - onclick="javascript:showMessage('');"> + onclick="javascript:showMessage('');"> Index: lams_tool_vote/web/learning/AllNominations.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/web/learning/AllNominations.jsp,v diff -u -r1.42.2.1.2.3 -r1.42.2.1.2.4 --- lams_tool_vote/web/learning/AllNominations.jsp 14 Jan 2010 21:13:33 -0000 1.42.2.1.2.3 +++ lams_tool_vote/web/learning/AllNominations.jsp 10 Mar 2010 15:01:00 -0000 1.42.2.1.2.4 @@ -68,6 +68,7 @@ + Index: lams_tool_vote/web/learning/AnswersContent.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/web/learning/AnswersContent.jsp,v diff -u -r1.32.10.1 -r1.32.10.2 --- lams_tool_vote/web/learning/AnswersContent.jsp 16 Nov 2009 02:25:08 -0000 1.32.10.1 +++ lams_tool_vote/web/learning/AnswersContent.jsp 10 Mar 2010 15:00:59 -0000 1.32.10.2 @@ -35,13 +35,13 @@ - <fmt:message key="activity.title" /> - + <fmt:message key="activity.title" />