2.0 - integration with organic groups
anarcat - October 31, 2006 - 07:16
| Project: | Decisions |
| Version: | HEAD |
| Component: | Code |
| Category: | feature request |
| Priority: | minor |
| Assigned: | samuelsov |
| Status: | needs work |
Description
We should support organic groups, but not depend on it.
There are at least 2 ways of doing this:
- Build the electoral list from an organic group
- Make some decisions accessible to only certain groups
There are probably more ways, but I'd like to at least implement #1.

#1
In fact, i think the best way to do that is to add a hook so modules can add custom "Add user" section in the electoral list tab.
We can provide :
* add single user
* add role
* add og group members
* ...
#2
#3
Agreed. I think we should still implement decisions_og module that depends on og and implement a
hook_decisions_electoral_list(). decisions itself could implement the 'role' part since roles are (currently) built into drupal.#4
First step, i have created the hook and moved the actual form in a new file.
Next steps :
* in the file decisions_electoral_list, add possibility to add / remove roles to the list
* create a new module og_decisions with the hook_decisions_electoral_list() implemented and maybe other functions specific to og_decisions
#5
* Use [[http://api.drupal.org/api/function/module_invoke_all/6|module_invoke_all()]] instead of reinventing the wheel.
* I think the hook should return lists of users instead of form items
#6
* right...
* I know form is not a good thing to return. Just to be sure, do you mean, REPLACE INTO {decisions_electoral_list} goes after
module_invoke_all('electoral_list' ...)in decisions.module ?#7
I'm not sure I understand the last comment. Please reroll the patch, I will understand code. :)
#8
Pushing this to 2.0.