It would be nice, as admin, to see who voted for what. Certainly some votes are secret but on our site none of the voting needs to be secret. Sure, I can just write a script that will do this, but, it would be a nice feature in many cases.

If these were an option, an admin could configure his system so the display wasn't available.

Comments

mathieu’s picture

Component: User interface » Code

Decisions has a goal of complete traceability ... but it's not yet coded. But this is clearly a feature that should make it's way, somehow, someday.. :) (I wish I had time to code stuff!)

anders.fajerson’s picture

I can just write a script that will do this

That's what patches are for ;)

Poll.module for Drupal 5.0 has this functionality, a first step could be to review that feature and see if that is a good way of implementing it.

ChrisKennedy’s picture

Status: Active » Needs review

Added, let me know if it looks okay. http://drupal.org/cvs?commit=43097

anders.fajerson’s picture

No to be picky, but since you asked :) I also feel we are in a stage where we can step up a step in terms of quality of the code:

1. 2 spaces in "...votes for this Decision. If anonymous users...". Also a empty line above $separators = array('decisions-ranking' => ' > ', 'decisions-poll' => ', '); that shouldn't be there
2. This code comment doesn't make much sense to me:

// Don't need to do anything
$rankings = $ranking;

.. you do something...
3. Use $outer_array instead of $outerArray
4. dv.value, dv.uid, dv.hostname etc should be vv.value, vv.uid, vv.hostname etc
5, Why is print theme('page', $output); used, and not return $output?
6. This could benefit of a code comment:

if (!$node->showvotes) {
drupal_not_found();
return;
}

I also think it could be an good idea to mention in the CVS log when a commit introduces a database change.

ChrisKennedy’s picture

1. Done
2. Done
3. Done
4. Done
5. I did that because that's how it's done in poll.module.
6. Done

I went through decisions.module and cleaned up some other areas too.

Agreed, I'll try to remember to include db changes in commit logs.

http://drupal.org/cvs?commit=43350

ChrisKennedy’s picture

Status: Needs review » Fixed

Fixed.

Anonymous’s picture

Status: Fixed » Closed (fixed)