Index: lams_tool_forum/conf/language/lams/ApplicationResources.properties =================================================================== diff -u -re77a187a78d34a375c994837fa07a3dbc4453007 -rf1e0b7ce7d91dd9bb8c03647456beec2be16b612 --- lams_tool_forum/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision e77a187a78d34a375c994837fa07a3dbc4453007) +++ lams_tool_forum/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision f1e0b7ce7d91dd9bb8c03647456beec2be16b612) @@ -237,6 +237,10 @@ error.attachment.executable =Uploaded file is executable label.upload.info =Uploaded file must not be executable and not exceed size of {0} output.desc.all.users.answers.definition.forum =Each learner's posts sent in the Forum +label.rateLimits.forum.reminder = Rating limitation: Minimum {0} and Maximum {1} per thread. +label.rateLimits.forum.reminder.min = You must rate at least {0} postings. +label.rateLimits.forum.reminder.max = You can only rate up to {0} postings. +js.error.validate.number = There is an error with the minimum and/or maximum set for ratings. Please check and try again. #======= End labels: Exported 231 labels for en AU ===== Index: lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/persistence/Forum.java =================================================================== diff -u -r0762d2ed47bda6daf6a2ae4eca9b3409b7c3b3ea -rf1e0b7ce7d91dd9bb8c03647456beec2be16b612 --- lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/persistence/Forum.java (.../Forum.java) (revision 0762d2ed47bda6daf6a2ae4eca9b3409b7c3b3ea) +++ lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/persistence/Forum.java (.../Forum.java) (revision f1e0b7ce7d91dd9bb8c03647456beec2be16b612) @@ -73,7 +73,11 @@ private int maximumReply; private int minimumReply; + + private int maximumRate; + private int minimumRate; + private boolean allowRichEditor; private String instructions; @@ -677,4 +681,28 @@ public void setSubmissionDeadline(Date submissionDeadline) { this.submissionDeadline = submissionDeadline; } + + /** + * @hibernate.property column="maximum_rate" + * @return + */ + public int getMaximumRate() { + return maximumRate; + } + + public void setMaximumRate(int maximumRate) { + this.maximumRate = maximumRate; + } + + /** + * @hibernate.property column="minimum_rate" + * @return + */ + public int getMinimumRate() { + return minimumRate; + } + + public void setMinimumRate(int minimumRate) { + this.minimumRate = minimumRate; + } } Index: lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/util/ForumConstants.java =================================================================== diff -u -r136bf9472ef5da3932ae7bb0e0a344004bba3ad9 -rf1e0b7ce7d91dd9bb8c03647456beec2be16b612 --- lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/util/ForumConstants.java (.../ForumConstants.java) (revision 136bf9472ef5da3932ae7bb0e0a344004bba3ad9) +++ lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/util/ForumConstants.java (.../ForumConstants.java) (revision f1e0b7ce7d91dd9bb8c03647456beec2be16b612) @@ -72,10 +72,14 @@ public static final String ATTR_ALLOW_UPLOAD = "allowUpload"; public static final String ATTR_ALLOW_NEW_TOPICS = "allowNewTopics"; - + public static final String ATTR_ALLOW_RICH_EDITOR = "allowRichEditor"; public static final String ATTR_ALLOW_RATE_MESSAGES = "allowRateMessages"; + + public static final String ATTR_MINIMUM_RATE = "minimumRate"; + + public static final String ATTR_MAXIMUM_RATE = "maximumRate"; public static final String ATTR_LIMITED_CHARS = "limitedChars"; Index: lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/LearningAction.java =================================================================== diff -u -r5f90da972465070c83d4344fed95952f1d94fe8e -rf1e0b7ce7d91dd9bb8c03647456beec2be16b612 --- lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/LearningAction.java (.../LearningAction.java) (revision 5f90da972465070c83d4344fed95952f1d94fe8e) +++ lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/LearningAction.java (.../LearningAction.java) (revision f1e0b7ce7d91dd9bb8c03647456beec2be16b612) @@ -221,6 +221,8 @@ sessionMap.put(ForumConstants.ATTR_ALLOW_EDIT, forum.isAllowEdit()); sessionMap.put(ForumConstants.ATTR_ALLOW_UPLOAD, forum.isAllowUpload()); sessionMap.put(ForumConstants.ATTR_ALLOW_RATE_MESSAGES, forum.isAllowRateMessages()); + sessionMap.put(ForumConstants.ATTR_MINIMUM_RATE, forum.getMinimumRate()); + sessionMap.put(ForumConstants.ATTR_MAXIMUM_RATE, forum.getMaximumRate()); sessionMap.put(ForumConstants.ATTR_ALLOW_NEW_TOPICS, forum.isAllowNewTopic()); sessionMap.put(ForumConstants.ATTR_ALLOW_RICH_EDITOR, allowRichEditor); sessionMap.put(ForumConstants.ATTR_LIMITED_CHARS, new Integer(allowNumber)); Index: lams_tool_forum/web/jsps/authoring/advance.jsp =================================================================== diff -u -rbf1c66f82afbc349f5702f29a0c6ab6ff9add34a -rf1e0b7ce7d91dd9bb8c03647456beec2be16b612 --- lams_tool_forum/web/jsps/authoring/advance.jsp (.../advance.jsp) (revision bf1c66f82afbc349f5702f29a0c6ab6ff9add34a) +++ lams_tool_forum/web/jsps/authoring/advance.jsp (.../advance.jsp) (revision f1e0b7ce7d91dd9bb8c03647456beec2be16b612) @@ -26,13 +26,52 @@

+ styleId="allowRateMessages" onclick="checkRating()" >

+

+ + + + + + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + + + + + + + + + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + + +

+ +

@@ -218,8 +257,8 @@ var allowNew = document.getElementsByName("forum.allowNewTopic"); var min= document.getElementById("minimumReply"); var max= document.getElementById("maximumReply"); - - //disable reply limited drop list + + //enable if rate is on if(allowNew[0].checked){ min.disabled=true; max.disabled=true; @@ -231,7 +270,35 @@ } } allowNewTopic(); + + function checkRating(){ + var allowRate = document.getElementsByName("forum.allowRateMessages"); + var min= document.getElementById("minimumRate"); + var max= document.getElementById("maximumRate"); + + if(allowRate[0].checked){ + min.disabled=false; + max.disabled=false; + } else { + min.disabled=true; + max.disabled=true; + } + } + checkRating(); + + function validateRatings() { + var minRateDropDown = document.getElementById("minimumRate"); + var minRatings = minRateDropDown.options[minRateDropDown.selectedIndex].value; + var maxRateDropDown = document.getElementById("maximumRate"); + var maxRatings = maxRateDropDown.options[maxRateDropDown.selectedIndex].value; + + if((minRatings > maxRatings) && !(maxRatings == 0)){ + alert(''); + } + + } + function checkReflection(){ var ropt = document.getElementById("reflectOn"); var rins = document.getElementById("reflectInstructions"); Index: lams_tool_forum/web/jsps/learning/viewforum.jsp =================================================================== diff -u -rc36dbb20e331722ae474d623bb7b7983f5680dcf -rf1e0b7ce7d91dd9bb8c03647456beec2be16b612 --- lams_tool_forum/web/jsps/learning/viewforum.jsp (.../viewforum.jsp) (revision c36dbb20e331722ae474d623bb7b7983f5680dcf) +++ lams_tool_forum/web/jsps/learning/viewforum.jsp (.../viewforum.jsp) (revision f1e0b7ce7d91dd9bb8c03647456beec2be16b612) @@ -59,9 +59,39 @@ + + + +

+ + + + +
+ + + +
+ + + +
+
+ + +
+ + + +
+
+ + + + <%@ include file="/common/messages.jsp"%> <%@ include file="/jsps/learning/message/topiclist.jsp"%>