Content rating incorrect rounding

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
5/20/2013 5:51:43 AM
Gravatar
Total Posts 27
https://ict.ken.be
Hybrid coding since
the dawn of time.

Content rating incorrect rounding

Hi,

I was just testing the content rating and it seems it is using integers for average.

Which I think will give a negative view on content, a module that has all 5 stars and only one 4 will get 4 stars instead of 5.

It is easily corrected in the stored procedure but I assume this was done as a performace optimization? 

K

ALTER PROCEDURE [dbo].[mp_ContentRating_GetStatsByContent]
@ContentGuid uniqueidentifier
AS

-- before: SELECT COALESCE(AVG(Rating),0) As CurrentRating,
SELECT COALESCE(CONVERT(int,ROUND(AVG(CONVERT(decimal,Rating)),0)),0) As CurrentRating,

Count(*) As TotalRatings
FROM [dbo].[mp_ContentRating]
WHERE [ContentGuid] = @ContentGuid

5/31/2013 11:04:17 AM
Gravatar
Total Posts 18439

Re: Content rating incorrect rounding

Thanks! I've queued this change into the script for the next release.

Best,

Joe

You must sign in to post in the forums. This thread is closed to new posts.