Posted by MPiccinato on June 10, 2008 at 2:30pm
Jump to:
| Project: | Voting API |
| Version: | master |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
As I understand the module already allows for multiple votes by one user. A setting to calculate votes based only on the most recent vote by a user would be a good setting. This would be helpful to maintain a voting history.
Comments
#1
VotingAPI's default vote calculations are optimized for speed and simplicity. "Latest vote from user" style calculations, while interesting, would also force much more complex queries. Third-party modules can use hook_votingapi_results_alter() to implement their own calculation styles, such as the one you describe.
#2
I can see that different style of calculation as being a hit on performance.
What about storing the old votes in a 'history' table instead of deleting them? Also doing the same with the cache? Once a new vote comes in, instead of deleting it or overwriting it first, just make a copy and then do the update. This way the calculation stays the same.
If this is not an issue for the voting api to handle I can understand that. I have began creating a module which currently implements this feature.
#3
#4
Hmmm. That would definitely slow things down, as all votes would be double-inserted, but it could be an interesting case. To step back, though, what is it that you're trying to accomplish? the 'Voting History' sounds unrelated to the 'only calculate based on the latest vote' tallying style... Perhaps I'm missing something? :)
#5
You are perhaps missing something cause I should explain better what it is I am trying to accomplish =D
In the particular site I am using this for, users may change their vote or 'opinion'. This 'opinion' would be attached to an item in which their
feeling for it could change over time. I wanted to track their changes, kind of how a node has a revision history, I am looking for a vote to
have a revision history.
A separate table would work for this, so that the vote calculation can remain the same. Another feature to go with this would be to create a
history of the cache table also.
This could be a useful 'option' for some site owners.
#6
I gather from this issue that there is no current way to track voting history. Is that info stored in the database anywhere? I am fine with tromping through tables and hard-to-read data, if it is in there.
(My particular issue is that I have a site where each issue usually gets 8-10 votes, and some entries in the past week have gotten 50+. Site owner is concerned he is getting hoodwinked since Real Live Money is given out based on the voting results. I figured the easiest way to check would be to see if each vote was, in fact, actually attached to one-and-only-one valid user.)
Thanks!