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:

  1. Build the electoral list from an organic group
  2. Make some decisions accessible to only certain groups

There are probably more ways, but I'd like to at least implement #1.

#1

samuelsov - March 12, 2009 - 22:42

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

samuelsov - March 12, 2009 - 22:43
Assigned to:Anonymous» samuelsov

#3

anarcat - March 12, 2009 - 23:13

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

samuelsov - March 12, 2009 - 23:31

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

AttachmentSize
decisions-HEAD-92138-4.patch 6.59 KB
decisions_electoral_list.inc_.txt 3.79 KB

#5

anarcat - March 12, 2009 - 23:44
Status:active» needs work

* 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

samuelsov - March 13, 2009 - 15:03

* 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

anarcat - March 21, 2009 - 18:16

I'm not sure I understand the last comment. Please reroll the patch, I will understand code. :)

#8

anarcat - July 27, 2009 - 23:56
Title:integration with organic groups» 2.0 - integration with organic groups

Pushing this to 2.0.

 
 

Drupal is a registered trademark of Dries Buytaert.