Allow add tool categories in sakai.properties.
Description
Attachments
- 06 Mar 2013, 09:45 AM
- 06 Mar 2013, 07:17 AM
- 06 Mar 2013, 07:07 AM
- 06 Mar 2013, 07:06 AM
is related to
Activity

Hudson CI Server March 8, 2013 at 8:25 AM
Integrated in kernel-trunk #606 (See http://builds.sakaiproject.org:8080/job/kernel-trunk/606/)
Allow adding and overriding tool categories in sakai.properties.
See default sakai properties for details of how to use this. (Revision 120927)
Result = SUCCESS

Aaron Zeckoski March 8, 2013 at 7:06 AM
Applied to trunk
Earle Nietzel March 7, 2013 at 4:56 PM
Patch looks good and tested both:
tool.categories.<tool id>=<category x>
and
tool.categories.append.<tool id>=<category x>

Aaron Zeckoski March 6, 2013 at 10:00 AMEdited
default sakai properties addition would be like this:
Override/Append Sakai Tool categories
NOTE: categories are also set in the sakai tool xml files in each tool
Normally, if you want to add a new category (site type) to a tool, you have to change the /tools/toolid.xml file.
This config option adds 2 ways to adjust the categories. The first is to append new categories to any
already defined for the tool. The second is to override any categories set for the tool with a new set.
(1) Append the categories to the existing set of categories (has no effect if it is blank)
Example: tool.categories.append.sakai.announcements=course
Default: use the categories defined in the tool xml file
tool.categories.append.{toolid}=category1,category2,category3
(2) Override the current tool categories with a new set of categories (removes all categories if it is blank)
Example: tool.categories.sakai.announcements=course,project
Default: use the categories defined in the tool xml file
tool.categories.{toolid}=category1,category2,category3

Aaron Zeckoski March 6, 2013 at 9:45 AM
Attaching the patch (KNL-1031.patch.txt) which integrates the comments I put above. Pretty much a total rewrite so should be separately reviewed.
If you want to add a new category (site type) to a tool, you have to change all the /tools/toolid.xml files. You could have all those files in sakai.home rather than distributed across webapps, but you still have to change a lot of files, and also, in the long term, you could be affected if changes are made to the original files since you are using now a modified copy of them. We think that most people just modify those files for adding new categories but those files include other things like tool title, function require...
Therefore, It would be good to have them work independently. If you'll be able to add a property like tool.categories.toolid=category1,category2,category3,.... you could manage all tool categories within the same file, avoiding the copy of the entire toolId.xml file.