Forum OpenACS Development: Re: Mapping category trees to object types

Collapse
Posted by Tom Jackson on
Could you create a new acs_object type to map category_tree to object_type?

I'm not sure how making object_type into an acs_object would allow you to have default permissions on objects of a particular type, I guess by setting the context_id of the object to that of the object_type, which hardly ever would be correct.

The idea of a dummy object, I think I once called a proxy object. Set permissions on the proxy and then other objects inherit through their context_id.

What is the purpose of mapping a category tree to a row in object_type?

Collapse
Posted by Malte Sussdorff on
The purpose is the following. I have a package course management with two object types (at the moment): Course and Courseinstance (similar to dotlrn). For editing the course instance I want to have one tree, for editing the course I want to use two other trees.

In the custom package this can be easily solved by adding the category_tree_id to the ad_form, but if you want to generalize this you are stuck. because there is no way to do this kind of mapping.

I think I will use a mapping within categories, but for the time being it is a custom package so I dont have to worry about it too much. And adding the mapping in categories would mean a lot of code writing, so I will stay away from it until needed (as you should provide an UI for it as well ...).