Download & Extend

2.0 - integration with organic groups

Project:Decisions
Version:6.x-1.x-dev
Component:Code - Base Decisions module
Category:feature request
Priority:minor
Assigned:samuelsov
Status:needs work

Issue Summary

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.

Comments

#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

Assigned to:Anonymous» samuelsov

#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

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

#5

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

* 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

Title:integration with organic groups» 2.0 - integration with organic groups

Pushing this to 2.0.

#9

Component:Code» Code - Base Decisions module

Just wondering what the status is on the 2.0. Looking forward to OG integration. :)

#10

subscribe thx!