[development] Rating module quality

Jeff Eaton jeff at viapositiva.net
Thu Jan 26 19:02:33 UTC 2006

VotingAPI is a pure storage/calculation system. At present there are a
couple of small modules built on it, and a couple of large-ish ones under
development. Modules use the votingapi_set_vote() function to cast a vote
for a user, and similar retrieval functions. the votingapi_hook has a
'calculate' $op that allows modules to do custom filtering of votes before
aggregates are calculated -- filtering out banned users, etc.
There are a couple of example implementations (latestgreatest.module and
simplevote.module) that use it, as well as a couple of larger projects. I'm
in the final stages of converting nmoderation.module to the API as well. To
accomplish what you're talking about, we might:
1) Turn comments on for projects
2) Alter the comment form on project nodes to add a multicriteria ratings
widget (A series of form radio buttons, 1-5, for each criteria)
3) Persist the votes using the votingAPI
4) Calculate the averages (filtering out votes from banned/blocked users)
5) Alter node_view for project nodes to put the average/median/whatever
votes into the project node body.
6) Alter comment_views for project nodes to put a particular user's ratings
for a module next to any comments about the module.
That approach would be relatively straightforward and wouldn't require a lot
of hacking. The only drawback I can think of is that it would append the
user's rating of the module onto EVERY comment they post.

-----Original Message-----
From: Steven Peck [mailto:speck at blkmtn.org] 
Sent: Thursday, January 26, 2006 12:44 PM
To: development at drupal.org; kb at 2bits.com
Subject: RE: [development] Rating module quality

Not having looked at the voting api... is it merely a rating module or does
it have the ability to have the users comments with their vote?  Also,
assuming that these votes are tied to a user account, do these
votes/comments reflect account status?  Example, Bob really likes module B
and creates several accounts to mess with the results, bob's accounts are
blocked... does this reflect into the count?  Also, we have more spammers
now (not a lot but...) when we block there account can we also delete the
comments in the vote (shows up in tracker)?  It would definitly be a vector
for spam.  Download.com has this issue at times with their user supplied

-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 5184 bytes
Desc: not available
Url : http://lists.drupal.org/pipermail/development/attachments/20060126/165e5a3b/winmail-0001.bin

More information about the development mailing list