The decisions.module contains a bunch of mode-specific code, like code referring to algorithms for instance. We need to move that code out of the core and have the various modes implement them with hooks.

Comments

tatien’s picture

Title: Clean-up the mode-specific code in decisions.module » Moved the task to "Code".
Component: Documentation » Code
tatien’s picture

Title: Moved the task to "Code". » First patch submitted (algorithms)
StatusFileSize
new2.75 KB

This first patch resolves the problem wrt algorithms.

tatien’s picture

Title: First patch submitted (algorithms) » Code cleanup
StatusFileSize
new1.9 KB

This is some code cleanup to continue on. It basically removes the _decisions_modes_list() function.

tatien’s picture

StatusFileSize
new883 bytes

This patch actually completes the job made in last patch, in a cleaner way.

tatien’s picture

StatusFileSize
new1.4 KB

Modified the hook_node_info to automatically build according to the different modes.

tatien’s picture

Title: Code cleanup » Remove mode-specific dependencies from the core module
StatusFileSize
new803 bytes

Modified the decisions_help($section) method.

tatien’s picture

StatusFileSize
new1.24 KB

Patched the decisions_menu() function.

tatien’s picture

StatusFileSize
new4.23 KB

Patched decisions_tab_votes().

tatien’s picture

StatusFileSize
new1.32 KB

Patched the function decisions_insert($node).

tatien’s picture

Status: Active » Needs review

Nothing else to do from what I can see wrt this issue. Waiting for review of patches 1-8.

anarcat’s picture

Assigned: tatien » anarcat

i'll look into this.

anarcat’s picture

Re: patch #_3 and #_4, do not send diff in another format than -u, otherwise it can mis-apply. Second, merge relevant patches instead of packing them on top of another.

anarcat’s picture

Status: Needs review » Needs work

patches 1 to 3 were applied and committed. Patch 4 has a problem, it does not define the mode_node_info() hooks and will therefore need to be reworked. I will not apply the other patches until I have that piece.

Also, when patches are ready to committed, mark them as "ready to be committed" :)

tatien’s picture

StatusFileSize
new1.03 KB

This patch fixes the problem wrt mode_node_info() from patch 4.

anarcat’s picture

Status: Needs work » Reviewed & tested by the community

Cool, I've applied #4, moving on the 5-8.

anarcat’s picture

Status: Reviewed & tested by the community » Needs work
StatusFileSize
new4.19 KB

I've reworked the patch #5 to name the hooks decisions_format_votes_(), but it doesn't apply anymore, I don't know why..

anarcat’s picture

That was of course the patch #7 i was talking about here, the patch #5 and 6 have been applied to CVS.

anarcat’s picture

Status: Needs work » Fixed

Okay, we've figured out the #7, and all patches have now been applied. Considering this issue as resolved, as the last string occurrence of "poll" remaining in the module is in a weird div class. :)

Anonymous’s picture

Status: Fixed » Closed (fixed)