Index: tool/src/java/org/sakaiproject/evaluation/tool/locators/SettingsWBL.java =================================================================== --- tool/src/java/org/sakaiproject/evaluation/tool/locators/SettingsWBL.java (revision 79543) +++ tool/src/java/org/sakaiproject/evaluation/tool/locators/SettingsWBL.java (working copy) @@ -80,7 +80,7 @@ else if ( ((String)toset).equals(EvalToolConstants.ADMIN_BOOLEAN_NO) ) toset = Boolean.FALSE; else { - throw new IllegalStateException("Invalid value for this ternary boolean: " + toset); + throw new IllegalStateException("Invalid value for " + beanname + " and this ternary boolean: " + toset); } } else { /* Index: tool/src/java/org/sakaiproject/evaluation/tool/settings/ConfigSettingsPropertiesFileParser.java =================================================================== --- tool/src/java/org/sakaiproject/evaluation/tool/settings/ConfigSettingsPropertiesFileParser.java (revision 0) +++ tool/src/java/org/sakaiproject/evaluation/tool/settings/ConfigSettingsPropertiesFileParser.java (revision 0) @@ -0,0 +1,87 @@ +/** + * Copyright 2005 Sakai Foundation Licensed under the + * Educational Community License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may + * obtain a copy of the License at + * + * http://www.osedu.org/licenses/ECL-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an "AS IS" + * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +package org.sakaiproject.evaluation.tool.settings; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.util.HashMap; +import java.util.Map; + +import org.apache.commons.io.IOUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.sakaiproject.evaluation.tool.producers.ImportConfigProducer; +import org.springframework.web.multipart.MultipartFile; + +/** + * Parses the incoming properties file and then supplies the results to the classes that need to handle the results. + * + * @author chasegawa + */ +public class ConfigSettingsPropertiesFileParser { + private static Log log = LogFactory.getLog(ConfigSettingsPropertiesFileParser.class); + + /** + * @return "uploadSuccess" if the parsing was completed without issue. Otherwise, return "uploadFailure". + */ + public String parse() { + MultipartFile file = (MultipartFile) multipartMap.get("configFile"); + HashMap result = new HashMap(); + /* We manually parse the properties file rather than using the java.util.Properties due to the keys having a ':' in + * the string (':' is one of the three valid separator values in the Java properties file definition). + */ + BufferedReader reader = null; + try { + reader = new BufferedReader(new InputStreamReader(file.getInputStream())); + while (reader.ready()) { + String linein = reader.readLine(); + String[] keyValuePair = linein.split("="); + result.put(keyValuePair[0], keyValuePair[1]); + } + } catch (IOException ioe) { + log.error("Error reading uploaded properties file for overwrite settings", ioe); + return "uploadFailure"; + } finally { + IOUtils.closeQuietly(reader); + } + // Update the producer so it can show the results on the html template + importConfigProducer.setUploadedConfigValues(result); + // Update the handler so the settings can be saved if the user chooses to do so + overwriteSettingHandler.setUploadedConfigValues(result); + return "uploadSuccess"; + } + + private ImportConfigProducer importConfigProducer; + + public void setImportConfigProducer(ImportConfigProducer importConfigProducer) { + this.importConfigProducer = importConfigProducer; + } + + @SuppressWarnings("rawtypes") + private Map multipartMap; + + @SuppressWarnings("rawtypes") + public void setMultipartMap(Map multipartMap) { + this.multipartMap = multipartMap; + } + + private OverwriteSettingHandler overwriteSettingHandler; + + public void setOverwriteSettingHandler(OverwriteSettingHandler overwriteSettingConfiguration) { + this.overwriteSettingHandler = overwriteSettingConfiguration; + } +} Property changes on: tool/src/java/org/sakaiproject/evaluation/tool/settings/ConfigSettingsPropertiesFileParser.java ___________________________________________________________________ Added: svn:eol-style + native Index: tool/src/java/org/sakaiproject/evaluation/tool/settings/OverwriteSettingHandler.java =================================================================== --- tool/src/java/org/sakaiproject/evaluation/tool/settings/OverwriteSettingHandler.java (revision 0) +++ tool/src/java/org/sakaiproject/evaluation/tool/settings/OverwriteSettingHandler.java (revision 0) @@ -0,0 +1,91 @@ +/** + * Copyright 2005 Sakai Foundation Licensed under the + * Educational Community License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may + * obtain a copy of the License at + * + * http://www.osedu.org/licenses/ECL-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an "AS IS" + * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +package org.sakaiproject.evaluation.tool.settings; + +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.HashMap; + +import org.apache.commons.lang.StringUtils; +import org.sakaiproject.evaluation.logic.EvalSettings; +import org.sakaiproject.evaluation.tool.EvalToolConstants; +import org.sakaiproject.evaluation.tool.locators.SettingsWBL; + +import uk.org.ponder.dateutil.LocalSDF; + +/** + * OverwriteSettingHandler handles saving the the "override settings" uploaded by a user. + * @author chasegawa + */ +public class OverwriteSettingHandler { + private boolean isTernaryBoolean(String path) { + boolean isTernary = false; + for (int i = 0; i < EvalSettings.TERNARY_BOOLEAN_SETTINGS.length; i++) { + if (EvalSettings.TERNARY_BOOLEAN_SETTINGS[i].equals(path)) { + isTernary = true; + break; + } + } + return isTernary; + } + + /** + * Update the settings using the values supplied from a user upload. + */ + public String saveOverwriteSettings() { + // Don't do anything if for some reason there are no settings. + if (uploadedConfigValues.keySet().size() > 0) { + for (String key : uploadedConfigValues.keySet()) { + String value = uploadedConfigValues.get(key); + // The SettingsWBL wont accept the actual value for the db, so we have to translate it so it can be re-translated + if (isTernaryBoolean(key)) { + value = translateToTernaryValue(value); + } + // Make sure "null"s and empties go in as a true null + if (key.indexOf("java.util.Date") > -1) { + SimpleDateFormat sdf = new SimpleDateFormat("EEE MMM dd HH:mm:ss z yyyy"); + LocalSDF localSDF = new LocalSDF(); + try { + value = localSDF.format(sdf.parse(value.toString())); + } catch (ParseException ignore) { + } + } + value = (StringUtils.isEmpty(value) || "null".equalsIgnoreCase(value)) ? null : value; + settings.set(key, value); + } + } + // Reset this now that we are done with it. + uploadedConfigValues = new HashMap(); + settings.resetConfigCache(); + return "overwriteSuccess"; + } + + private SettingsWBL settings; + public void setSettingsBean(SettingsWBL settings) { + this.settings = settings; + } + + private static HashMap uploadedConfigValues = new HashMap(); + public void setUploadedConfigValues(HashMap newValues) { + OverwriteSettingHandler.uploadedConfigValues = newValues; + } + + private String translateToTernaryValue(String value) { + if ("true".equalsIgnoreCase(value)) return EvalToolConstants.ADMIN_BOOLEAN_YES; + if ("false".equalsIgnoreCase(value)) return EvalToolConstants.ADMIN_BOOLEAN_NO; + return EvalToolConstants.ADMIN_BOOLEAN_CONFIGURABLE; + } +} Property changes on: tool/src/java/org/sakaiproject/evaluation/tool/settings/OverwriteSettingHandler.java ___________________________________________________________________ Added: svn:eol-style + native Index: tool/src/java/org/sakaiproject/evaluation/tool/settings/ExportConfigurationHook.java =================================================================== --- tool/src/java/org/sakaiproject/evaluation/tool/settings/ExportConfigurationHook.java (revision 0) +++ tool/src/java/org/sakaiproject/evaluation/tool/settings/ExportConfigurationHook.java (revision 0) @@ -0,0 +1,108 @@ +/** + * Copyright 2005 Sakai Foundation Licensed under the + * Educational Community License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may + * obtain a copy of the License at + * + * http://www.osedu.org/licenses/ECL-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an "AS IS" + * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +package org.sakaiproject.evaluation.tool.settings; + +import java.io.IOException; +import java.lang.reflect.Field; +import java.text.ParseException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Comparator; + +import javax.servlet.ServletOutputStream; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.sakaiproject.evaluation.logic.EvalSettings; + +/** + * ExportConfigurationHook handles the request from the system to export the current Evaluation settings as a properties + * file. + * + * @author chasegawa + */ +public class ExportConfigurationHook { + public static final String VIEW_ID = "export_settings"; + private static Log log = LogFactory.getLog(ExportConfigurationHook.class); + + /** + * This is required in order to avoid runtime reflection error. + */ + public void doNothing() { + } + + private String getEvalSettingConstValueByFieldName(String propertyFieldName) { + try { + return EvalSettings.class.getDeclaredField(propertyFieldName).get(String.class).toString(); + } catch (Exception e) { + return "Error getting value"; + } + } + + /** + * @return The list of Strings that is the names of all the individual properties fields in EvalSettings.java + */ + private ArrayList getSortedEvalSettingsPropertyFieldNames() { + ArrayList result = new ArrayList(); + Field[] evalSettingFields = EvalSettings.class.getFields(); + Arrays.sort(evalSettingFields, new Comparator() { + public int compare(Field o1, Field o2) { + return o1.getName().compareTo(o2.getName()); + } + }); + for (Field field : evalSettingFields) { + // Ignore the arrays of String in EvalSettings (they just aggregate the types) and just get the String constants + if (String.class.equals(field.getType())) { + result.add(field.getName()); + } + } + return result; + } + + public boolean handle() throws ParseException { + response.setContentType("application/octet-stream"); + response.setHeader("Content-Disposition", "attachment; filename=\"evalSettings.properties\""); + ArrayList propertyFieldNames = getSortedEvalSettingsPropertyFieldNames(); + ServletOutputStream out = null; + try { + out = response.getOutputStream(); + for (String propertyFieldName : propertyFieldNames) { + String constValue = getEvalSettingConstValueByFieldName(propertyFieldName); + out.write(constValue.getBytes()); + out.write("=".getBytes()); + Object settingVal = evalSettings.get(constValue); + // When there is no value, we need to output something or the properties file will not work + out.write(null == settingVal ? "null".getBytes() : settingVal.toString().getBytes()); + out.write("\n".getBytes()); + } + } catch (IOException e) { + log.error("Error producing output stream for evalSettings.properties", e); + return false; + } + return true; + } + + private EvalSettings evalSettings; + public void setEvalSettings(EvalSettings evalSettings) { + this.evalSettings = evalSettings; + } + + private HttpServletResponse response; + public void setResponse(HttpServletResponse response) { + this.response = response; + } +} Property changes on: tool/src/java/org/sakaiproject/evaluation/tool/settings/ExportConfigurationHook.java ___________________________________________________________________ Added: svn:eol-style + native Index: tool/src/java/org/sakaiproject/evaluation/tool/utils/RootHandlerBeanOverride.java =================================================================== --- tool/src/java/org/sakaiproject/evaluation/tool/utils/RootHandlerBeanOverride.java (revision 79543) +++ tool/src/java/org/sakaiproject/evaluation/tool/utils/RootHandlerBeanOverride.java (working copy) @@ -14,33 +14,52 @@ */ package org.sakaiproject.evaluation.tool.utils; +import java.text.ParseException; + +import javax.servlet.http.HttpServletRequest; + import org.sakaiproject.evaluation.tool.reporting.ReportHandlerHook; +import org.sakaiproject.evaluation.tool.settings.ExportConfigurationHook; import uk.org.ponder.rsf.processor.support.RootHandlerBeanBase; /** * This class exists because RootHandlerBeanBase has a bug in that if a request is handled by a DataView or HandlerHook, - * setupResponseWriter is called and blasts content-type back to text/html. See RSF-123 + * setupResponseWriter is called and blasts content-type back to text/html. See RSF-123 * * @author andrew * @see OverridedServletRootHandlerBean */ public class RootHandlerBeanOverride { + public void handle() throws ParseException { + String path = request.getRequestURL().toString(); + if (path.indexOf(ExportConfigurationHook.VIEW_ID) > -1) { + exportConfigHook.handle(); + } else { + if (!reportHandlerHook.handle()) { + rootHandlerBeanBase.handle(); + } + } + } - private RootHandlerBeanBase rootHandlerBeanBase; - private ReportHandlerHook reportHandlerHook; + private ExportConfigurationHook exportConfigHook; + public void setExportConfigHook(ExportConfigurationHook hook) { + this.exportConfigHook = hook; + } - public void setRootHandlerBeanBase(RootHandlerBeanBase rootHandlerBeanBase) { - this.rootHandlerBeanBase = rootHandlerBeanBase; - } + private HttpServletRequest request; + public void setHttpServletRequest(HttpServletRequest request) { + this.request = request; + } - public void setReportHandlerHook(ReportHandlerHook reportHandlerHook) { - this.reportHandlerHook = reportHandlerHook; - } + private ReportHandlerHook reportHandlerHook; + public void setReportHandlerHook(ReportHandlerHook reportHandlerHook) { + this.reportHandlerHook = reportHandlerHook; + } - public void handle() { - if (!reportHandlerHook.handle()) { - rootHandlerBeanBase.handle(); - } - } + private RootHandlerBeanBase rootHandlerBeanBase; + public void setRootHandlerBeanBase(RootHandlerBeanBase rootHandlerBeanBase) { + this.rootHandlerBeanBase = rootHandlerBeanBase; + } } Index: tool/src/java/org/sakaiproject/evaluation/tool/utils/RenderingUtils.java =================================================================== --- tool/src/java/org/sakaiproject/evaluation/tool/utils/RenderingUtils.java (revision 79543) +++ tool/src/java/org/sakaiproject/evaluation/tool/utils/RenderingUtils.java (working copy) @@ -52,10 +52,10 @@ int responseCount = responseArray.length - 1; // remove the NA count from the end int totalAnswers = 0; int totalValue = 0; - int totalWeight = 0; + //int totalWeight = 0; for (int i = 0; i < responseCount; i++) { int weight = i+1; - totalWeight += weight; + //totalWeight += weight; totalAnswers += responseArray[i]; totalValue += (weight * responseArray[i]); } Index: tool/src/java/org/sakaiproject/evaluation/tool/producers/ImportConfigProducer.java =================================================================== --- tool/src/java/org/sakaiproject/evaluation/tool/producers/ImportConfigProducer.java (revision 0) +++ tool/src/java/org/sakaiproject/evaluation/tool/producers/ImportConfigProducer.java (revision 0) @@ -0,0 +1,142 @@ +/** + * Copyright 2005 Sakai Foundation Licensed under the + * Educational Community License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may + * obtain a copy of the License at + * + * http://www.osedu.org/licenses/ECL-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an "AS IS" + * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +package org.sakaiproject.evaluation.tool.producers; + +import java.lang.reflect.Field; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Comparator; +import java.util.HashMap; +import java.util.List; + +import org.sakaiproject.evaluation.logic.EvalCommonLogic; +import org.sakaiproject.evaluation.logic.EvalSettings; +import org.sakaiproject.evaluation.tool.renderers.NavBarRenderer; + +import uk.org.ponder.rsf.components.UIBranchContainer; +import uk.org.ponder.rsf.components.UICommand; +import uk.org.ponder.rsf.components.UIContainer; +import uk.org.ponder.rsf.components.UIForm; +import uk.org.ponder.rsf.components.UIMessage; +import uk.org.ponder.rsf.components.UIOutput; +import uk.org.ponder.rsf.flow.jsfnav.NavigationCase; +import uk.org.ponder.rsf.flow.jsfnav.NavigationCaseReporter; +import uk.org.ponder.rsf.view.ComponentChecker; +import uk.org.ponder.rsf.viewstate.SimpleViewParameters; +import uk.org.ponder.rsf.viewstate.ViewParameters; + +/** + * ImportConfigProducer handles the server side operations to ready the import_config page. + * @author chasegawa + */ +public class ImportConfigProducer extends EvalCommonProducer implements NavigationCaseReporter { + /** + * @see org.sakaiproject.evaluation.tool.producers.EvalCommonProducer#fill(uk.org.ponder.rsf.components.UIContainer, + * uk.org.ponder.rsf.viewstate.ViewParameters, uk.org.ponder.rsf.view.ComponentChecker) + */ + @Override + public void fill(UIContainer tofill, ViewParameters viewparams, ComponentChecker checker) { + boolean userAdmin = commonLogic.isUserAdmin(commonLogic.getCurrentUserId()); + if (!userAdmin) { + throw new SecurityException("Non-admin users may not access this page"); + } + + navBarRenderer.makeNavBar(tofill, NavBarRenderer.NAV_ELEMENT, this.getViewID()); + + UIForm uploadform = UIForm.make(tofill, "upload-form"); + UICommand.make(uploadform, "upload-button", UIMessage.make("importconfig.upload.button"), "propertiesFileParser.parse"); + setCurrentSettingsForDisplay(tofill); + + // Only add the commit button if the user has uploaded settings. + if (!uploadedConfigValues.keySet().isEmpty()) { + UIForm overwriteForm = UIForm.make(tofill, "overwrite-form"); + UICommand.make(overwriteForm, "overwrite-button", UIMessage.make("importconfig.overwrite.config.button"), "overwriteSettingsHandler.saveOverwriteSettings"); + } + + // Clean the uploaded settings out + uploadedConfigValues = new HashMap(); + } + + public static final String VIEW_ID = "import_config"; + @Override + public String getViewID() { + return VIEW_ID; + } + + /** + * @see uk.org.ponder.rsf.flow.jsfnav.NavigationCaseReporter#reportNavigationCases() + */ + @SuppressWarnings({ "rawtypes", "unchecked" }) + public List reportNavigationCases() { + List i = new ArrayList(); + i.add(new NavigationCase("uploadSucces", new SimpleViewParameters(VIEW_ID))); + i.add(new NavigationCase("uploadFailure", new SimpleViewParameters(AdministrateProducer.VIEW_ID))); + i.add(new NavigationCase("overwriteSuccess", new SimpleViewParameters(AdministrateProducer.VIEW_ID))); + return i; + } + + private EvalCommonLogic commonLogic; + public void setCommonLogic(EvalCommonLogic commonLogic) { + this.commonLogic = commonLogic; + } + + /** + * Fill the current parameter names and values into the UIContainer. + */ + private void setCurrentSettingsForDisplay(UIContainer tofill) { + Field[] evalSettingFields = EvalSettings.class.getFields(); + Arrays.sort(evalSettingFields, new Comparator() { + public int compare(Field o1, Field o2) { + return o1.getName().compareTo(o2.getName()); + } + }); + for (Field field : evalSettingFields) { + // Ignore the arrays of String and just get the String constants + if (String.class.equals(field.getType())) { + // Create data for new element + UIBranchContainer row = UIBranchContainer.make(tofill, "settings:"); + String propertyName = ""; + try { + propertyName = EvalSettings.class.getDeclaredField(field.getName()).get(String.class).toString(); + } catch (IllegalArgumentException e) { + } catch (SecurityException e) { + } catch (IllegalAccessException e) { + } catch (NoSuchFieldException e) { + } + UIOutput.make(row, "propertyName", propertyName); + Object settingValue = evalSettings.get(propertyName); + UIOutput.make(row, "currentValue", null == settingValue ? "null" : settingValue.toString()); + String incomingValue = uploadedConfigValues.get(propertyName); + UIOutput.make(row, "incomingValue", null == incomingValue ? "" : incomingValue); + } + } + } + + private EvalSettings evalSettings; + public void setEvalSettings(EvalSettings evalSettings) { + this.evalSettings = evalSettings; + } + + private NavBarRenderer navBarRenderer; + public void setNavBarRenderer(NavBarRenderer navBarRenderer) { + this.navBarRenderer = navBarRenderer; + } + + private static HashMap uploadedConfigValues = new HashMap(); + public void setUploadedConfigValues(HashMap hashMap) { + ImportConfigProducer.uploadedConfigValues = hashMap; + } +} Property changes on: tool/src/java/org/sakaiproject/evaluation/tool/producers/ImportConfigProducer.java ___________________________________________________________________ Added: svn:eol-style + native Index: tool/src/java/org/sakaiproject/evaluation/tool/producers/AdministrateProducer.java =================================================================== --- tool/src/java/org/sakaiproject/evaluation/tool/producers/AdministrateProducer.java (revision 79543) +++ tool/src/java/org/sakaiproject/evaluation/tool/producers/AdministrateProducer.java (working copy) @@ -19,6 +19,7 @@ import org.sakaiproject.evaluation.logic.EvalSettings; import org.sakaiproject.evaluation.tool.EvalToolConstants; import org.sakaiproject.evaluation.tool.renderers.NavBarRenderer; +import org.sakaiproject.evaluation.tool.settings.ExportConfigurationHook; import org.sakaiproject.evaluation.tool.viewparams.AdminSearchViewParameters; import org.sakaiproject.evaluation.utils.EvalUtils; @@ -102,6 +103,14 @@ UIMessage.make("administrate.top.control.evaladmin"), new SimpleViewParameters(ControlEvalAdminProducer.VIEW_ID)); + UIInternalLink.make(tofill, "control-export-settings-toplink", + UIMessage.make("administrate.top.control.export.settings"), + new SimpleViewParameters(ExportConfigurationHook.VIEW_ID)); + + UIInternalLink.make(tofill, "control-import-settings-toplink", + UIMessage.make("administrate.top.control.import.settings"), + new SimpleViewParameters(ImportConfigProducer.VIEW_ID)); + UIInternalLink.make(tofill, "test-evalgroupprovider-toplink", UIMessage.make("admintesteg.page.title"), new SimpleViewParameters(AdminTestEGProviderProducer.VIEW_ID)); Index: tool/src/java/org/sakaiproject/evaluation/tool/bundle/messages.properties =================================================================== --- tool/src/java/org/sakaiproject/evaluation/tool/bundle/messages.properties (revision 79543) +++ tool/src/java/org/sakaiproject/evaluation/tool/bundle/messages.properties (working copy) @@ -17,7 +17,7 @@ general.private=Private general.command.edit=Edit general.command.delete=Remove -general.command.split.block=Seperate this group into individual items +general.command.split.block=Separate this group into individual items general.command.preview=Preview general.copy=Copy general.processing=Processing... @@ -165,6 +165,8 @@ administrate.top.control.hierarchy=Control Hierarchy administrate.top.control.reporting=Control Reporting administrate.top.control.evaladmin=Control Eval Admin +administrate.top.control.export.settings=Export Configuration +administrate.top.control.import.settings=Import Configuration administrate.top.control.search=Search administrate.general.require.comments.block.note=Require a comments block to be included in every evaluation administrate.general.eval.closed.still.recent.note=Number of days old can an eval be and still be recently closed @@ -1192,3 +1194,14 @@ controlevaladmin.message.sakai.admin.access.disabled=Sakai admin access has been disabled. controlevaladmin.enable.sakai.admin.button=Enable controlevaladmin.disable.sakai.admin.button=Disable + +# Import Configuration +importconfig.config.property=Property Name +importconfig.config.current.property=Current Setting +importconfig.config.import.property=Import Setting +importconfig.confirm.overwrite=Overwriting the settings will replace all current settigns using the values from the uploaded file. \n Please confirm you wish to continue. +importconfig.overwrite.config.button=Overwrite Settings +importconfig.page.title=Import Configuration +importconfig.settings.header=System Configuration +importconfig.upload.button=Upload +importconfig.upload.instructions=Select Eval configuration file to upload \ No newline at end of file Index: tool/src/webapp/WEB-INF/applicationContext.xml =================================================================== --- tool/src/webapp/WEB-INF/applicationContext.xml (revision 79543) +++ tool/src/webapp/WEB-INF/applicationContext.xml (working copy) @@ -52,7 +52,8 @@ templateBeanLocator, templateItemWBL, answersBeanLocator, responseAnswersBeanLocator, responseBeanLocator, evaluationBeanLocator, takeEvalBean, settingsBean, emailSettingsBean, scaleBean, scaleBeanLocator, itemWBL, hierNodeLocator, hierNodeLocatorInvoker, hierNodeGroupsLocator, hierNodeGroupsLocatorInvoker, - emailTemplateWBL, administrateSearchBean, sendEmailsBean, selectedEvaluationUsersLocator, assignGroupSelectionSettings, evalAdminBean, hierarchyBean" /> + emailTemplateWBL, administrateSearchBean, sendEmailsBean, selectedEvaluationUsersLocator, + assignGroupSelectionSettings, evalAdminBean, hierarchyBean, propertiesFileParser, overwriteSettingsHandler" /> - + + + @@ -896,4 +898,26 @@ + + + + + + + + + + + + + + + + + + + + + + Index: tool/src/webapp/WEB-INF/web.xml =================================================================== --- tool/src/webapp/WEB-INF/web.xml (revision 79543) +++ tool/src/webapp/WEB-INF/web.xml (working copy) @@ -46,6 +46,10 @@ sakai.request org.sakaiproject.util.RequestFilter + + upload.enabled + false + Index: tool/src/webapp/content/templates/administrate.html =================================================================== --- tool/src/webapp/content/templates/administrate.html (revision 79543) +++ tool/src/webapp/content/templates/administrate.html (working copy) @@ -41,28 +41,34 @@
  • Administrate
  • - Test EvalGroupProvider + Test EvalGroupProvider
  • -
  • +
  • Control Eval Admin
  • -
  • +
  • Control Email
  • -
  • +
  • Control Importing
  • -
  • +
  • Control Hierarchy
  • -
  • +
  • Control Reporting
  • -
  • +
  • + Import Configuration +
  • +
  • + Export Configuration +
  • +
  • Search
  • -
  • +
  • Sync Group Members
  • Index: tool/src/webapp/content/templates/import_config.html =================================================================== --- tool/src/webapp/content/templates/import_config.html (revision 0) +++ tool/src/webapp/content/templates/import_config.html (revision 0) @@ -0,0 +1,85 @@ + + + + + Import Configuration + + + + + + + + + + + +
    + +
    +
    + +
    + + + \ No newline at end of file Property changes on: tool/src/webapp/content/templates/import_config.html ___________________________________________________________________ Added: svn:eol-style + native Index: tool/pom.xml =================================================================== --- tool/pom.xml (revision 79543) +++ tool/pom.xml (working copy) @@ -183,6 +183,10 @@ ${rsfutil.version}-sakai_${sakairsf.sakai.version} war + + org.springframework + spring-webmvc + @@ -229,6 +233,10 @@ ${rsfutil.version}-sakai_${sakairsf.sakai.version} war + + org.springframework + spring-webmvc + @@ -346,6 +354,14 @@ + + commons-lang + commons-lang + + + commons-io + commons-io +