Forum OpenACS Development: Re: How to handle dotlrn-specific changes in core?

Collapse
Posted by Dave Bauer on
I think creating a new user (or adding them to a group, I am not sure of the exact behavior) is a place where there is a high probability of customization by an application, so a general solution here would pay off I think. Of course, removing a user would probably also need a callback (because they usually are not actually deleted, but would not recieve notifications etc.)

Janine,

Thank you for mentioning the APM callbacks. That sounds like the appropriate level of abstraction in this sort of case.

Collapse
Posted by Jeff Davis on
I like the idea of providing callbacks via a naming convention so have a proc like
callback namespace args
which would invoke all functions in the given namespace passing the given args. In this case the callback would be something like:
callback ::acs_user::change_state $old_state $new_state 
and you would define a function ::acs_user::change_state::dotlrn to handle this stuff for dotlrn.

alternatively you could just have an nsv of callback name and list of functions to invoke but it makes tracking down the callbacks a little more annoying I think.