Show rating calculated incorrectly

Topic Show rating calculated incorrectly

Home Community Site Issues Show rating calculated incorrectly

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #35843 Score: 0
    chickenStickets
    Participant
    3 pts

    There are at least 3 glitches in the way show ratings are calculated and presented. The first of these is a serious problem. The other 2 don’t amount to much.

    1) The number of hearts selected does not produce the expected rating number. This is easiest to see when rating a show that has no votes. Selecting 5 stars will result in a rating of 3.96. Selecting half a star will result in a rating of 3.75.
    2) After rating a show, the new Rating and Votes values show up in the appropriate spot (under the Guest and Host info for the current show), but also in four inappropriate spots (previous show, next show, daily show, and random show). This goes away after clicking the refresh button.
    3) If you have submitted the only rating for a show, and the change your rating to 0, the site responds, “Your rating has been removed.” However, the actual rating remains unchanged, and the Votes number does not decrement.

    I’d be interested in knowing if other folks are experiencing similar problems.
    Thanks

    —NERD STUFF BELOW—————

    Here are a few additional observations that may help in debugging:

    I’ve only tested this in 2 browsers, but my experiences were identical the latest version MS Edge and Chrome.

    Obviously, I can’t see the server-side code that’s causing the problem, but I’ll use variable names from the page source code.

    data-show-rating values produce rating-number values as follows:

    data-show-rating rating-number
    0.5 3.75
    1.0 3.77
    1.5 3.80
    2.0 3.82
    2.5 3.84
    3.0 3.87
    3.5 3.89
    4.0 3.91
    4.5 3.93
    5.0 3.96

    After rounding, you would get this result from the function:
    rating-number = 3.73 + (data-show-rating x 0.045)

    I can only make wild guesses about what’s going on here, but since 0 stars isn’t an option, there’s a real rating range of 4.5 stars. Somewhere, this value is probably being divided by 100. The 3.73 is weird, but could be something simple like a misused database function that’s calculating a global average. Anyway, I’m sure the admin can find the screwy code without my blind speculation.

    Let me know if I can provide additional info to help track down this bug.

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.