Index: lams_admin/web/WEB-INF/tags/Rating.tag =================================================================== RCS file: /usr/local/cvsroot/lams_admin/web/WEB-INF/tags/Attic/Rating.tag,v diff -u -r1.1.2.1 -r1.1.2.2 --- lams_admin/web/WEB-INF/tags/Rating.tag 16 Jun 2016 03:10:21 -0000 1.1.2.1 +++ lams_admin/web/WEB-INF/tags/Rating.tag 27 Apr 2017 04:29:10 -0000 1.1.2.2 @@ -24,6 +24,7 @@ <%@ attribute name="averageRatingLabel" required="false" rtexprvalue="true" %> <%@ attribute name="minNumberWordsLabel" required="false" rtexprvalue="true" %> <%@ attribute name="showComments" required="false" rtexprvalue="true" %> +<%@ attribute name="allowRetries" required="false" rtexprvalue="true" %> <%-- Default value for message key --%> @@ -61,6 +62,10 @@ + + + + <%--Rating stars area---------------------------------------%>
@@ -77,7 +82,7 @@ - + Index: lams_central/web/WEB-INF/tags/Rating.tag =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/WEB-INF/tags/Attic/Rating.tag,v diff -u -r1.1.2.1 -r1.1.2.2 --- lams_central/web/WEB-INF/tags/Rating.tag 16 May 2016 13:39:57 -0000 1.1.2.1 +++ lams_central/web/WEB-INF/tags/Rating.tag 27 Apr 2017 04:32:18 -0000 1.1.2.2 @@ -24,6 +24,7 @@ <%@ attribute name="averageRatingLabel" required="false" rtexprvalue="true" %> <%@ attribute name="minNumberWordsLabel" required="false" rtexprvalue="true" %> <%@ attribute name="showComments" required="false" rtexprvalue="true" %> +<%@ attribute name="allowRetries" required="false" rtexprvalue="true" %> <%-- Default value for message key --%> @@ -61,6 +62,10 @@ + + + + <%--Rating stars area---------------------------------------%>
@@ -77,7 +82,7 @@ - + Index: lams_central/web/includes/javascript/rating.js =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/includes/javascript/rating.js,v diff -u -r1.1.2.11 -r1.1.2.12 --- lams_central/web/includes/javascript/rating.js 26 Dec 2016 02:53:51 -0000 1.1.2.11 +++ lams_central/web/includes/javascript/rating.js 27 Apr 2017 04:32:44 -0000 1.1.2.12 @@ -1,6 +1,6 @@ //Please, set up LAMS_URL, COUNT_RATED_ITEMS, COMMENTS_MIN_WORDS_LIMIT, MAX_RATES and MIN_RATES, MAX_RATINGS_FOR_ITEM, -//COMMENT_TEXTAREA_TIP_LABEL, WARN_COMMENTS_IS_BLANK_LABEL, WARN_MIN_NUMBER_WORDS_LABEL constants in parent document +//COMMENT_TEXTAREA_TIP_LABEL, WARN_COMMENTS_IS_BLANK_LABEL, WARN_MIN_NUMBER_WORDS_LABEL, ALLOW_RERATE constants in parent document //constant indicating there is rting limits set up var HAS_RATING_LIMITS; @@ -23,7 +23,7 @@ }); //initialize jRating and post comment button. Note: we need the quotes around undefined for the typeof ! -function initializeJRating(allowReRate) { +function initializeJRating() { var maxRatingsForItem; if ( typeof MAX_RATINGS_FOR_ITEM === "undefined" || MAX_RATINGS_FOR_ITEM === undefined ) @@ -37,19 +37,19 @@ else ratingLimitsByCriteria = LIMIT_BY_CRITERIA; - var nbRates = 0; - var canRateAgain = false; - if ( allowReRate ) { - nbRates = 100; - canRateAgain = true; + var canRateAgain; + if ( typeof ALLOW_RERATE === "undefined" || ALLOW_RERATE === undefined ) { + canRateAgain = false; + } else { + canRateAgain = ALLOW_RERATE; } $(".rating-stars-new").filter($(".rating-stars")).jRating({ phpPath : LAMS_URL + "servlet/rateItem?hasRatingLimits=" + HAS_RATING_LIMITS + "&ratingLimitsByCriteria=" + ratingLimitsByCriteria + "&maxRatingsForItem=" + maxRatingsForItem, rateMax : 5, decimalLength : 1, canRateAgain : canRateAgain, - nbRates : nbRates, + nbRates : canRateAgain ? 100 : 0, onSuccess : function(data, itemId){ $("#user-rating-" + itemId).html(data.userRating); $("#average-rating-" + itemId).html(data.averageRating); Index: lams_gradebook/web/WEB-INF/tags/Rating.tag =================================================================== RCS file: /usr/local/cvsroot/lams_gradebook/web/WEB-INF/tags/Attic/Rating.tag,v diff -u -r1.1.2.1 -r1.1.2.2 --- lams_gradebook/web/WEB-INF/tags/Rating.tag 18 Oct 2016 01:53:01 -0000 1.1.2.1 +++ lams_gradebook/web/WEB-INF/tags/Rating.tag 27 Apr 2017 04:33:49 -0000 1.1.2.2 @@ -24,6 +24,7 @@ <%@ attribute name="averageRatingLabel" required="false" rtexprvalue="true" %> <%@ attribute name="minNumberWordsLabel" required="false" rtexprvalue="true" %> <%@ attribute name="showComments" required="false" rtexprvalue="true" %> +<%@ attribute name="allowRetries" required="false" rtexprvalue="true" %> <%-- Default value for message key --%> @@ -61,6 +62,10 @@ + + + + <%--Rating stars area---------------------------------------%>
@@ -77,7 +82,7 @@ - + Index: lams_learning/web/WEB-INF/tags/Rating.tag =================================================================== RCS file: /usr/local/cvsroot/lams_learning/web/WEB-INF/tags/Attic/Rating.tag,v diff -u -r1.1.2.1 -r1.1.2.2 --- lams_learning/web/WEB-INF/tags/Rating.tag 18 Oct 2016 01:40:41 -0000 1.1.2.1 +++ lams_learning/web/WEB-INF/tags/Rating.tag 27 Apr 2017 04:39:04 -0000 1.1.2.2 @@ -24,6 +24,7 @@ <%@ attribute name="averageRatingLabel" required="false" rtexprvalue="true" %> <%@ attribute name="minNumberWordsLabel" required="false" rtexprvalue="true" %> <%@ attribute name="showComments" required="false" rtexprvalue="true" %> +<%@ attribute name="allowRetries" required="false" rtexprvalue="true" %> <%-- Default value for message key --%> @@ -61,6 +62,10 @@ + + + + <%--Rating stars area---------------------------------------%>
@@ -77,7 +82,7 @@ - +