Forum OpenACS Development: Making organizations subsite aware

Collapse
Posted by Alex Kroman on
So I added package_id into the main organizations table. I now have 2 questions:

- Within project manager how do I retrieve the correct package_id of the organization package?

- Within project manager how do I retrieve a list of organizations if the package is mounted multiple times within a subsite?

Collapse
Posted by Malte Sussdorff on
Hi Alex, we have been facing the same problem with contacts and logger and we are using application_links. This means we link the package_id of the project manager to the package_id of the organization package to make this happen.

We are doing the same with logger. If you want to take a look how it works, make a checkout of contacts, project-manager and logger in HEAD and you will notice the application_links (not to be confused with application data links, that link a specific project to a specific organization or dotlrn community.

Collapse
Posted by Orzenil Silva Junior on
Hi Malte,

i am in process of insert a great quantity of data to project-manager. I started about three weeks ago inserting the data to project-manager in oacs-5-1 branch.

As you and Alex pointed out i need logger package subsite aware (and organizations too). i took a look at HEAD about two days ago and saw there are great enhancements regarding integrating other packages like contacts and file-storage via callbacks and application_links. It is great and thank you for this work. Although the code is under heavy development and in some way is dotlrn specific - there are calls to dotlrn procs in some part of code, but most of them is easy to overcome checking if dotlrn is installed and i could use it with OpenAcs only.

But i saw logger is not yet very integrated with project-manager in HEAD, or am i missing something?

As Logger integration is priority to my work with project-manager could you give me a status of this development on HEAD?

Thank you in advance

\Orzenil

Collapse
Posted by Alex Kroman on
Grepping through that code doesn't find any references to "application_links". What should I be looking for?
Collapse
Posted by Alex Kroman on
Ahh, I see it, nevermind... I take it this application_link feature is 5.2 only?
Collapse
Posted by Alex Kroman on
Ok here is my code to grab a package_id of another package within the same subsite. It is extremely ugly.

# Retrieve package_id of organizations package
set node_id [site_node::get_node_id_from_object_id -object_id [ad_conn subsite_id]]
set node [site_node::get_children -node_id $node_id -package_key organizations]
array set organization_node [site_node::get -url $node]
set organization_package_id [site_node::get_object_id -node_id $organization_node(node_id)]

Collapse
Posted by Dave Bauer on
# Retrieve package_id of organizations package
set node_id [site_node::get_node_id_from_object_id -object_id [ad_conn subsite_id]]
set organization_package_id [site_node::get_children -node_id $node_id -package_key organizations -element package_id]

is a litle easier.

Collapse
Posted by Malte Sussdorff on
Orzenil, the heavy development will slowly ebb down after end of next week (hopefully). As for the logger integration, I can integrate it perfectly, not sure why you don't think there is logger integration. Or, let's be precise, what do you expect of logger integration. It is integrated as it was before, though now it works with subsites (as it works with .LRN :)).

As for the .LRN specific code, whenever you find it, just write a wrapper around it, we might have added .LRN specific code during the "we code all night long" weekends and forget to wrap a check around it.

Collapse
Posted by Nick Carroll on
Could someone with admin rights create a category in the tips and hints blog called "Code Snippets". I would like to see useful code snippets like grabbing the package_id of an application within a subsite in the blog.

Or give me admin rights so that I can maintain the blog. :)

Collapse
Posted by Ben Koot on
"Code snippet" category added.
Cheers