Forum .LRN Q&A: site-wide parameter handling in dotLRN

I was very pleased to find the extensive use of ACS parameters in dotLRN as this eases customization a lot. However, I was wondering if we could improve the way that we deal with parameters that are site-wide (meaning that they should only be set once for a certain site).

My understanding of the dotLRN package type is that it is comparable with the ACS Subsite package type as they are both used for nesting packages (creating subsites). Accordingly Departments and Subjects and Classes are all implemented as dotLRN package instances. It also means that the root dotLRN site-node is a dotLRN instance, just like the main site node of an ACS installation is of type ACS Subsite.

One problem with this setup is that site-wide parameters (such as RegistrationRequiresApprovalP for ACS Subsite, or departments_pretty_name for dotLRN) can be set in each subsite package instance, rather than only in one package as one would expect. A solution that comes to mind is to associate certain parameters with package types rather than instances. Such parameters would be analogous to static variables in object oriented programming. Has anyone else thought about this problem? Are there better solutions?

Collapse
Posted by Don Baccus on
As I was reading your post "he wants static vars" came to mind ... just as you said later on.  I think this is a reasonable approach, i.e. allow one to create parameters that are bound to the package type rather than package instance.

We should remember this for 4.6 (nag Lars, Peter!)