I wasn't sure if this should go into support requests or feature requests. I'm using groups in an educational website that is structured similar to drupalEd. Groups are being used as courses. I'd like to use subgroups as a way for teachers to create groups within a course. So far it seems to work, but I'd like to be able have a block that lists the groups and subgroups in a tree format, rather than using the normal group block.

I wasn't able to do this in views, as there are no filters for subgroups. Having a block added when you installed the module that did this would be optimal, although being able to create views based on subgroups could possibly be very useful.

My php is pretty basic, but I looked through the module searching for a function that will display the tree, but couldn't get anything to work on a block using php. If there is a simple hook that will grab the $gid from $node, and then use that to display a tree for that parent, it would great to know.

Thanks

Comments

Steel Rat’s picture

I second this request. I'm setting up a very similar site, educational in nature.

Each group (Course) will have subgroups (Units) which can be paid for individually. Right now there isn't an easy way to see all the subgroups attached to a group.

FYI mine will be strictly linear in hierarchy, subgroups will have only one parent.

Anonymous’s picture

request nr. 5 to this issue i found on my search through the drupal jungle:
need a possibility to create a view which shows the parent groups and its children in a sorted way (and i don´t wanna do the senseless/double work with taxonomies on that)
i wonder what all ppl do who use subgroups. are they happy to have them listed in a chaotic way ( og/all ) or am i just too blind to see the obvious ?

isn´t there anybody out there with a solution for this (rather simple) issue ?

ezra-g’s picture

Category: support » feature
ezra-g’s picture

@Nianbei : Is what you're describing a block that displays the same view as node/[nid]view/tree where nid corresponds to the group node currently being viewed? If so, that's fairly straightforward to implement and something I would support.

Anonymous’s picture

@ezra-g: That's exactly what I'm looking for, similar to how the Book Module outlines it's pages within a book. For Example, in my site, we might have a language course called Arabic 101, with several sections of subgroups:

Arabic 101
* Section 1
* Section 2
* Section 3
* Section 4

I think if you are the group manager or admin of Arabic 101, then you would ofcourse see all the subgroups, but if you are only subscribed to Section 1, you would see:

Arabic 101
* Section 1

The point of this would be to limit students access to only subgroups they belong to, and give them an easy navigator for teachers to move between subgroups and view section content. Hope that clarifies my request!

Steel Rat’s picture

This is exactly what I'd be looking for as well.

chekov’s picture

Hi all,

I happen to have just added some code to og_subgroups which gives it a block which presents a tree-hierarchy view of the group structure. I'm rather new to Drupal development and how this community stuff works, so I don't know how to go about getting it accepted - help welcome.

ezra-g’s picture

@checkov: That's great news!

The best way to contribute that code back would be to submit a patch towards this module.

You can find instructions for creating patches at http://drupal.org/patch .

Please let me know if you could use any help creating a patch.

ezra-g’s picture

Version: 5.x-2.0 » 5.x-4.0
amitaibu’s picture

Status: Active » Fixed

This is fixed in 5.x-4.0, also this might help you to show the block only when the group is part of a subgroups hierarchy.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.