|
|
|
[
Permlink
| « Hide
]
Denny - 24-Feb-2008 18:29
Some of local customizations need to be removed.
A couple of changes have been checked in according to user feedback. In as 45338:
1. templates are grouped by site types; User uses checkbox to select "use template" for site creation or not; 2. since all ids of the special sites in OOTB Sakai start with "!", we will mark the template site starting with the "!", too. So it will be like "!template.engin", for example 3. Depending on whether there is any template site defined in the system, different instructions will be shown on the site creation page: a) if there is no template site at all, show the original text "Choose the type of site you want to create. Only instructors can create official course websites. Instructors and students can create project websites. NOTE: Students, if you do not see a tab for your course, contact your instructor for information about when your official course website will be available." b) otherwise, show "You can create a new project site in one of two ways. A <b>Build-Your-Own project site</b> (for experienced users) lets you choose individual site tools and functions. A <b>Template-based site</b> (recommended for new users) comes pre-loaded with essential tools and functions. Please note, you can add or remove tools from either type of project site, once created." 4. Bypass the security checking when copying contents from various tools in the template site; 5. Show tool title in the site creation confirmation page. - Zhen I did some testing the trunk.
There are some problems if template site id starting with the "!", e.g. "!template.graduate". The behaviours of special sites are different compared to normal sites. 1. When I create the template site following the instruction in http://confluence.sakaiproject.org/confluence/display/WSSI/Home, the realms for the template site (/site/!template.graduate) is not created. I can work around this by open realm "!site.template" and save as "/site/!template.graduate". 2. The content of resources is different to normal sites. 3. After I add normal user as a participant with 'maintain' role, the template site is not listed in the site list. Due to this issues, I think it would be better change the SITE_TEMPLATE_PREFIX to just "template" without "!". Kind regards, Denny The current implementation searches all sites in the system in order to find the matching template site. This causes performance problem when dealing with large number of sites in production system.
Now the suggested way for config template sites is: 1) add "site.templates" configuration variable into sakai.properties. Put the template site ids as the value, separated by comma, e.g. "site.templates=template.course,template.project" 2) in admin Sites tool, create the tempates with the above ids for various site types. User logs into MyWorkspace and sees the templates as choices for site creation. - Zhen Do we need to restart the tomcat when a new template site created and sakai.properties file is updated?
Alternatively, add a new method in site service that can search for sites based on site Id with wildcard (e.g. contain "template" -> "%template%" in SQL where clause). This method would be useful for tool "Site" in "Administrative Workspace". Cheers, Denny Yes, to read the properties would require a restart. Although I think in the config editor for 2.6 they plan to to be able to push changed properties across all nodes in a cluster and re-read them. Though I'm not sure if many people will actively use that. It would be nice I think if it has static properties and dynamically configurable properties, I haven't looked this much at it.
But this particular change was only done because it was the fastest solution we could come up with the fix this problem. On a instance with over 10,000 sites this look up took over 2 minutes to execute on each new site. If some query could be optimized for much faster site lookups, or some other method could be used for defining what the templates are, that would be pretty useful too, but it seemed like any kind of solution like that would take longer than to implement. ;) It doesn't even look from an auto.ddl startup that the TITLE field in SAKAI_SITE is indexed, so that wouldn't help things, but I think this could be greatly improved. This could also be configured on a special worksite like |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||