Forum OpenACS Q&A: Re: calendar union "view"?

Collapse
Posted by Dirk Gomez on
Currently the best approach seems a mapping table that can be filled via the
admin pages. Hacking the views-* queries is qute straight-forward - especially
if you use the HEAD version that is substantially cleaned up. If you hack
this, let me know, I'd be happy about a patch.

Before implementing a cooler solution - whatever it may be exactly - some of
calendar's deficiencies need to be solved: The calendar data model seems like
a port from ACS3.  You can define multiple calendars per instance which was
necessary in ACS3 where you couldn't mount multiple instances of one
package. It is not necessary anymore, because you can mount arbitrarily many
calendar instances and assign permissions on the instance level. (You can
assign permissions on the calendar level as well since 5.0)

Also calendar creates a permission island by having a private_p flag in the
calendars table. This needs to be revised if we ever get site-wide services
like search or linking to work with calendar objects. Either the whole of
OpenACS then learns about private_p (and all other packages' idiosyncracies)
or we drop it...

Here's one possible idea: On the ShareNet project we used this approach for
packages. For every package where it made sense we created a magic url
e. g. "my-calendar" that would show *all* your appointments. An item created
under this url would automatically be a private item. An item created under
any other url would be assigned to this package's context.

There would be no more confusing "personal" switch on the cal-item-new page
and there would be one-stop page to see all your appointments.

A calendar instance mounted under an acs-subsite would show all the
acs-subsite's calendar packages' items. So the further down you drilled the
more specific appointments would get.

.LRN takes a similar approach: It passes in a list of calendar_ids to be
shown. How they are calculated I haven't yet really been able to drill down
into - maybe Don knows it now that he is working on portals?