Index: lams_admin/web/WEB-INF/tags/Rating.tag =================================================================== diff -u -radd7948dbdf9451fb5bb7839e22d2f22ca8b54f1 -r1c26c2925be758ef3f54ac2e98687f6d9db079d1 --- lams_admin/web/WEB-INF/tags/Rating.tag (.../Rating.tag) (revision add7948dbdf9451fb5bb7839e22d2f22ca8b54f1) +++ lams_admin/web/WEB-INF/tags/Rating.tag (.../Rating.tag) (revision 1c26c2925be758ef3f54ac2e98687f6d9db079d1) @@ -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 =================================================================== diff -u -r832f4665f1527659e37bbcd0c2b7b7a20d6fff10 -r1c26c2925be758ef3f54ac2e98687f6d9db079d1 --- lams_central/web/WEB-INF/tags/Rating.tag (.../Rating.tag) (revision 832f4665f1527659e37bbcd0c2b7b7a20d6fff10) +++ lams_central/web/WEB-INF/tags/Rating.tag (.../Rating.tag) (revision 1c26c2925be758ef3f54ac2e98687f6d9db079d1) @@ -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 =================================================================== diff -u -r4157e74ed646af370ccc0c1937733187c4e3117c -r1c26c2925be758ef3f54ac2e98687f6d9db079d1 --- lams_central/web/includes/javascript/rating.js (.../rating.js) (revision 4157e74ed646af370ccc0c1937733187c4e3117c) +++ lams_central/web/includes/javascript/rating.js (.../rating.js) (revision 1c26c2925be758ef3f54ac2e98687f6d9db079d1) @@ -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 =================================================================== diff -u -r6e11b20353d23ae1ef9a153af2109ec0e5c4049f -r1c26c2925be758ef3f54ac2e98687f6d9db079d1 --- lams_gradebook/web/WEB-INF/tags/Rating.tag (.../Rating.tag) (revision 6e11b20353d23ae1ef9a153af2109ec0e5c4049f) +++ lams_gradebook/web/WEB-INF/tags/Rating.tag (.../Rating.tag) (revision 1c26c2925be758ef3f54ac2e98687f6d9db079d1) @@ -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 @@ - +