Closed (fixed)
Project:
Voting API
Version:
6.x-2.3
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
25 Aug 2009 at 09:37 UTC
Updated:
30 Apr 2013 at 22:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
amaisano commentedI'm also very interested in this. We've got a role for "Technical Expert" and a role for "Average User," and each can vote nodes up/down. It would be very useful for our project to be able to display the vote results for each role separately, per node. Unfortunately the Views Relationship for Votes Cast By Users: User cannot be used as a relationship for the Views User: Role filter nor the similar Views Field, and I think that's the key.
Comment #2
torotil commentedIn this case I would define one voting tag for each role and give only that role the permission to vote. Both widgets could look the same but would be fed into two different voting pools. Then you can easily filter your vote results by tag. If you need the sum of both you still can do it with a simple aggregate query.
Directly joining the votes to the user table works around the votingapi_cache table and will get rather slow if your vote-table grows.
Comment #3
amaisano commentedDoes the voting_api permissions allow granular rating permission per voting tag?
Comment #4
torotil commented@amaisano the permission handling for the voting is usually done by the module using votingapi - not by votingapi itself.
Comment #5
amaisano commented@torotil #2 Could I achieve this separation by "cloning" the VUD (Vote Up/Down) module I am using, then simply changing the vote tag for it? Would that cause duplication issues or since the tags would be different they shouldn't collide? I can't think of another way besides cloning the module, because there is only one permission set for the module, and only a single tag this module can use.
Comment #6
torotil commentedI think patching VUD to support multiple voting-tags with multiple permissions might be a better solution. Simply copying it isn't really less work and a lot more "messy".
Comment #7
torotil commentedComment #8
process91 commentedI ended up writing a module which accomplishes this goal. I actually only hooked into the Voting API, so this solution could conceivably work for other modules as well. The issue and solution is discussed here:
http://drupal.org/node/1967640