I'm not sure whether this is a bug or merely poor design, so I'm seeking opinions on what to do.
In .LRN you can edit portal templates, which means arranging the canned portlets and adding static portlets. These templates are then used to set up the portal layout when a new user, class, etc is created.
When you go into a portal template and edit one of the static portlets, it does the following:
- update content and pretty_name in static_portal_content
- call portal::set_pretty_name, which updates the name in portal_element_map
The problem here is that every instance of this static portlet, meaning one for each user, class, etc has a row in portal_element_map, and the only one being updated is the one that's associated with the template. So the change to the pretty name does not propogate out to all the places where the portlet is actually used.
The root of the issue is that the portals code is responsible for fetching the pretty_name, while it calls into the static-portlet code to retrieve the content. If pretty_name were returned along with content then all would be well, but it isn't.
I think the right way to fix this would be to add a proc that would set the pretty_name for all instances of this static portlet. However this doesn't seem to be possible; I can't figure out a query that will give me all the elements of a particular datasource type for a specific theme. There doesn't seem to be any mapping from elements to themes.
Suggestions? Is this currently fixable, or does it need to wait for Don's new-new-portal rewrite?