Index: site-manage-tool/tool/src/java/org/sakaiproject/site/tool/SiteAction.java =================================================================== --- site-manage-tool/tool/src/java/org/sakaiproject/site/tool/SiteAction.java (revision 130244) +++ site-manage-tool/tool/src/java/org/sakaiproject/site/tool/SiteAction.java (working copy) @@ -733,6 +733,15 @@ private final static String SORT_ORDER_COURSE_OFFERING = "worksitesetup.sort.order.courseOffering"; private final static String SORT_KEY_SECTION = "worksitesetup.sort.key.section"; private final static String SORT_ORDER_SECTION = "worksitesetup.sort.order.section"; + + // bjones86 - SAK-23255 + private final static String CONTEXT_IS_ADMIN = "isAdmin"; + private final static String CONTEXT_SKIP_MANUAL_COURSE_CREATION = "skipManualCourseCreation"; + private final static String CONTEXT_SKIP_COURSE_SECTION_SELECTION = "skipCourseSectionSelection"; + private final static String CONTEXT_FILTER_TERMS = "filterTerms"; + private final static String SAK_PROP_SKIP_MANUAL_COURSE_CREATION = "wsetup.skipManualCourseCreation"; + private final static String SAK_PROP_SKIP_COURSE_SECTION_SELECTION = "wsetup.skipCourseSectionSelection"; + private static final String SAK_PROP_FILTER_TERMS = "worksitesetup.filtertermdropdowns"; private List prefLocales = new ArrayList(); @@ -2935,11 +2944,12 @@ context.put("basedOnTemplate", state.getAttribute(STATE_TEMPLATE_SITE) != null ? Boolean.TRUE:Boolean.FALSE); - context.put("skipCourseSectionSelection", ServerConfigurationService.getBoolean("wsetup.skipCourseSectionSelection", Boolean.FALSE)); + // bjones86 - SAK-21706 + context.put( CONTEXT_SKIP_COURSE_SECTION_SELECTION, + ServerConfigurationService.getBoolean( SAK_PROP_SKIP_COURSE_SECTION_SELECTION, Boolean.FALSE ) ); + context.put( CONTEXT_SKIP_MANUAL_COURSE_CREATION, + ServerConfigurationService.getBoolean( SAK_PROP_SKIP_MANUAL_COURSE_CREATION, Boolean.FALSE ) ); - // Added by bjones86 - determine to skip manual course site create link in worksite setup - context.put( "skipManualCourseCreation", ServerConfigurationService.getBoolean( "wsetup.skipManualCourseCreation", Boolean.FALSE)); - context.put("siteType", state.getAttribute(STATE_TYPE_SELECTED)); return (String) getContext(data).get("template") + TEMPLATE[36]; @@ -3008,6 +3018,11 @@ context.put("requireAuthorizer", ServerConfigurationService.getString("wsetup.requireAuthorizer", "true").equals("true")?Boolean.TRUE:Boolean.FALSE); + // bjones86 - SAK-21706/SAK-23255 + context.put( CONTEXT_IS_ADMIN, SecurityService.isSuperUser() ); + context.put( CONTEXT_SKIP_COURSE_SECTION_SELECTION, ServerConfigurationService.getBoolean( SAK_PROP_SKIP_COURSE_SECTION_SELECTION, Boolean.FALSE ) ); + context.put( CONTEXT_FILTER_TERMS, ServerConfigurationService.getBoolean( SAK_PROP_FILTER_TERMS, Boolean.FALSE ) ); + return (String) getContext(data).get("template") + TEMPLATE[37]; case 42: /* @@ -3254,10 +3269,12 @@ } context.put("value_uniqname", state.getAttribute(STATE_SITE_QUEST_UNIQNAME)); context.put("basedOnTemplate", state.getAttribute(STATE_TEMPLATE_SITE) != null ? Boolean.TRUE:Boolean.FALSE); - - // Added by bjones86 - determine to skip manual course site create link in worksite setup - context.put( "skipManualCourseCreation", Boolean.valueOf(ServerConfigurationService.getBoolean( "wsetup.skipManualCourseCreation", false))); + // bjones86 - SAK-21706/SAK-23255 + context.put( CONTEXT_IS_ADMIN, SecurityService.isSuperUser() ); + context.put( CONTEXT_SKIP_MANUAL_COURSE_CREATION, ServerConfigurationService.getBoolean( SAK_PROP_SKIP_MANUAL_COURSE_CREATION, Boolean.FALSE ) ); + context.put( CONTEXT_FILTER_TERMS, ServerConfigurationService.getBoolean( SAK_PROP_FILTER_TERMS, Boolean.FALSE ) ); + return (String) getContext(data).get("template") + TEMPLATE[53]; } case 54: @@ -13270,7 +13287,7 @@ private void prepFindPage(SessionState state) { // check the configuration setting for choosing next screen - Boolean skipCourseSectionSelection = ServerConfigurationService.getBoolean("wsetup.skipCourseSectionSelection", Boolean.FALSE); + Boolean skipCourseSectionSelection = ServerConfigurationService.getBoolean(SAK_PROP_SKIP_COURSE_SECTION_SELECTION, Boolean.FALSE); if (!skipCourseSectionSelection.booleanValue()) { // go to the course/section selection page @@ -13923,7 +13940,7 @@ } else { state.removeAttribute(STATE_TERM_COURSE_LIST); - Boolean skipCourseSectionSelection = ServerConfigurationService.getBoolean("wsetup.skipCourseSectionSelection", Boolean.FALSE); + Boolean skipCourseSectionSelection = ServerConfigurationService.getBoolean(SAK_PROP_SKIP_COURSE_SECTION_SELECTION, Boolean.FALSE); if (!skipCourseSectionSelection.booleanValue() && courseManagementIsImplemented()) { state.setAttribute(STATE_TEMPLATE_INDEX, "53"); Index: site-manage-tool/tool/src/bundle/sitesetupgeneric.properties =================================================================== --- site-manage-tool/tool/src/bundle/sitesetupgeneric.properties (revision 130244) +++ site-manage-tool/tool/src/bundle/sitesetupgeneric.properties (working copy) @@ -427,6 +427,9 @@ nscourse.select_group_sections=Select Group of Sections nscourse.unselect_group_sections=Unselect Group of Sections +# bjones86 - SAK-23255 +nscourse.no_sections_in_term=You don't have any sections in the selected term. Please go back and select a different term. +nscourse.manual_disabled=This feature has been disabled system-wide. Please contact support for more information. #Manual Vm ### (moot) man.creat = Creating a New Class Site Index: site-manage-tool/tool/src/webapp/vm/sitesetup/chef_site-newSiteCourseManual.vm =================================================================== --- site-manage-tool/tool/src/webapp/vm/sitesetup/chef_site-newSiteCourseManual.vm (revision 130244) +++ site-manage-tool/tool/src/webapp/vm/sitesetup/chef_site-newSiteCourseManual.vm (working copy) @@ -12,6 +12,9 @@