Index: lams_tool_preview/web/pages/learning/comment.jsp =================================================================== diff -u -r7475d08afc280b5e2e5ddf04e8bf35e3166aaf80 -r1136861207bfc774a4e683f29ee5a2f3116c83cf --- lams_tool_preview/web/pages/learning/comment.jsp (.../comment.jsp) (revision 7475d08afc280b5e2e5ddf04e8bf35e3166aaf80) +++ lams_tool_preview/web/pages/learning/comment.jsp (.../comment.jsp) (revision 1136861207bfc774a4e683f29ee5a2f3116c83cf) @@ -72,7 +72,7 @@ return url; } else { - submitEntry(); + submitEntry(null, true); return ""; } }, @@ -86,7 +86,8 @@ $(".tablesorter,.pager").hide(); $("#no-users-info").show(); } - + + numCommentsOnPage = 0; commentsOnOtherPages = data.countRatedItems; var isDisabled = "${finishedLock}"; var maxReached = false; @@ -221,11 +222,10 @@ - function submitEntry(next, url){ + function submitEntry(next, skipNumberValidation){ hideButtons(); - - if ( numCommentsOnPage + commentsOnOtherPages < ${minRates} ) { + if (!skipNumberValidation && (numCommentsOnPage + commentsOnOtherPages < ${minRates})) { alert(''.replace('{0}',${minRates}) ); return false; } @@ -281,7 +281,7 @@ function moveOn(next) { commentsSaved = true; - if ( ! ( typeof next === "undefined" ) ) { + if ( ! ( typeof next === "undefined" || next == null ) ) { return nextprev(next); } else { $(".tablesorter").trigger('pagerUpdate');