Bug reports Found a bug? Post it here please.
Version 4.x > Bug reports > Poll Module - Suggestions View modes: 
User avatar
Member
Member
matthew.lee-reedbusiness.com - 2/17/2009 7:48:36 PM
   
Poll Module - Suggestions
I have added the poll module to a website and found 2 issues.

1. The width of the "Majority Vote" Graph bar is always 100%.

I looked at the source code and found out the reasion. The current ratio equation is
ratio = currentValue / maxValue. If we use ratio = currentValue / countSummary. The width of the graph bars would be displayed in term of their percentages.

2. ShowGraph properties

If now we set the ShowGraph property = false, the graph bar and results would be displayed until someone submits an answer. Page reloads and shows the bar and results. However, when the page refresh again, both checkbox and results were not shown. Below is the code I found to fix this issue.

In the CreateAnswerSection(bool reload) method before the CreateGraph function, we could add one more condition - (this.CheckVoted && PollInfoProvider.HasVoted(pi.PollID)). This would resolve the issue.

if ((this.ShowGraph) || ((reload) && (this.ShowResultsAfterVote)) || (this.CheckVoted && PollInfoProvider.HasVoted(pi.PollID))).
{
// Create graph under the answer
CreateGraph(maxCount, ValidationHelper.GetInteger(row["AnswerCount"], 0), sumCount, index);
}


User avatar
Kentico Support
Kentico Support
kentico_jurajo - 2/23/2009 6:57:44 AM
   
RE:Poll Module - Suggestions
Hi,

Thank you for your detailed reports. We will try to improve and fix the bugs in some of the next versions. We are also sorry for the inconveniences.

Best Regards,
Juraj Ondrus