Forum OpenACS Development: application_groups

Collapse
Posted by David Arroyo Menéndez on

I've seen that there is a table called application_groups in acs_subsite, the idea is cool, but it doesn't run in my openacs instance. I've written a view called package_group_map that seems run:

CREATE VIEW package_group_map AS
SELECT ao_group.object_id AS group_id, ao_application.package_id
   FROM dotlrn_communities_all dca, acs_objects ao_application, acs_objects ao_group
  WHERE ao_application.context_id = dca.package_id AND dca.community_id = ao_group.object_id;

I think that would be interesting to be able to recover the group_id from the package_id in a more declarative way than doing this sql query. Perhaps this view may be useful to someone.

Regards!

Collapse
2: Re: application_groups (response to 1)
Posted by Dave Bauer on
All you need to do is get the package_id from dotlrn_communities_all. The community_id is the group_id.

It looks like you are trying to find the dotlrn community group associated with an application mounted under a dotlrn package instance.

You can use someting like this

set community_id [dotlrn_community::get_community_id -package_id $package_id]

This uses the site node table which is cached in memory so a database hit is not necessary.

Application groups are usually used to map one group to one package. Not to all the packages underneath it. Basically the dotlrn_communities_all table duplicates the application group mapping used for subsites. If you mount packages under a subsite, they do not have an application group mapping either.

Collapse
Posted by David Arroyo Menéndez on
It's true!, thanks for your response. 😊