Unable to add tools to sites created from some templates



Keyboard shortcuts  
Summarize the review outcomes (optional)


Warning: no files are visible, they have all been filtered.
Participant Role Time Spent Comments Latest Comment
Patrick Haggood (deleted user)
Author 25m 1 Placeholder for my changes; will clean that up.
Reviewer - Complete 5m 2 Patch looks good. I only have a question on one comment
Reviewer - Complete 7m    
Reviewer - 0% reviewed 0m    
Total   37m 3  


1) the list of tools displayed the tool selection list depends on the siteType. When a template or site created from a template is a non-core type (i.e. 'specialized_courses' or 'affiliation' vs 'course') then the type is unknown to the tool selection code (see SiteAction.orderToolIds, SiteAction.getTools, SiteAction.setToolRegistrationList and SiteAction.doSite_type) and all tools go into the unsorted or 'Not Grouped' list.

2) A final check of selected tools (chosenList) is checked against the siteType deep within SiteAction.saveFeatures; if a tool is not found to be in the set defined by the site type it's not added to the list of tools valid for that site type (ToolManager.findTools(categories).

To solve both issues, I've added SiteTypeUtils.getTargetSiteType() to return the base type of the template's site type; (i.e. an 'affiliation' is a type of 'course' - see UMICH-798). Using this base type the proper list of tools will always be selected for display (in #1 above) and when the site is saved (#2 above).

I also did a tiny bit of refactoring to getUngroupedTools - removing an unused parameter.

Branches in review


Issues Raised From Comments

Key Summary State Assignee

General Comments

Zhen Qian

Patch looks good. I only have a question on one comment

Patch looks good. I only have a question on one comment

/site-manage-tool/.../tool/SiteAction.java Changed   2
Open in IDE #permalink

Review updated: Reload | Ignore | Collapse

You cannot reload the review while writing a comment.

Create issue

Assign To Me

Log time against