0

I have a fivestar rating field "field_rate" in comments. I have only allowed a role "reviewer" to rate. if one reviewer say A sign in and rate the field the average is stored as stars. Now if another reviewer say B visits the same node, he can see the vote (overall avg of number of votes). I want that reviewers will not able to see each other rating so when reviewer B signs in he see only blank 5 stars instead of avg votes. At the same time i want editor role to view the average vote for that field. How can i achieve this?

0

I have found a solution, its so simple. Just have to tweak display setting for the rate field in managed display to "user's vote". Enable permission to vote for reviewer only.

For editor, I have used hook_node_view and displayed average rating. Since editor has no permission to vote, he can only see the average votes on the field in the node view. While reviewer can see his vote as per display setting.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.