remove alphanumeric versioning tag and prepare for v0.6.1 (RC)
This commit is contained in:
parent
e250f340d8
commit
66b77f5737
5 changed files with 58 additions and 39 deletions
2
pom.xml
2
pom.xml
|
@ -18,7 +18,7 @@
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<sebserver-version>0.6.0-rc</sebserver-version>
|
<sebserver-version>0.6.1</sebserver-version>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
|
@ -11,7 +11,6 @@ package ch.ethz.seb.sebserver.gui.content;
|
||||||
import java.util.function.BooleanSupplier;
|
import java.util.function.BooleanSupplier;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
|
|
||||||
import ch.ethz.seb.sebserver.gui.form.Form;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.eclipse.swt.widgets.Composite;
|
import org.eclipse.swt.widgets.Composite;
|
||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
|
@ -31,6 +30,7 @@ import ch.ethz.seb.sebserver.gbl.profile.GuiProfile;
|
||||||
import ch.ethz.seb.sebserver.gbl.util.Result;
|
import ch.ethz.seb.sebserver.gbl.util.Result;
|
||||||
import ch.ethz.seb.sebserver.gbl.util.Utils;
|
import ch.ethz.seb.sebserver.gbl.util.Utils;
|
||||||
import ch.ethz.seb.sebserver.gui.content.action.ActionDefinition;
|
import ch.ethz.seb.sebserver.gui.content.action.ActionDefinition;
|
||||||
|
import ch.ethz.seb.sebserver.gui.form.Form;
|
||||||
import ch.ethz.seb.sebserver.gui.form.FormBuilder;
|
import ch.ethz.seb.sebserver.gui.form.FormBuilder;
|
||||||
import ch.ethz.seb.sebserver.gui.form.FormHandle;
|
import ch.ethz.seb.sebserver.gui.form.FormHandle;
|
||||||
import ch.ethz.seb.sebserver.gui.service.ResourceService;
|
import ch.ethz.seb.sebserver.gui.service.ResourceService;
|
||||||
|
@ -177,7 +177,7 @@ public class LmsSetupForm implements TemplateComposer {
|
||||||
Domain.LMS_SETUP.ATTR_NAME,
|
Domain.LMS_SETUP.ATTR_NAME,
|
||||||
FORM_NAME_TEXT_KEY,
|
FORM_NAME_TEXT_KEY,
|
||||||
lmsSetup.getName())
|
lmsSetup.getName())
|
||||||
.mandatory(!readonly))
|
.mandatory(!readonly))
|
||||||
|
|
||||||
.addField(FormBuilder.singleSelection(
|
.addField(FormBuilder.singleSelection(
|
||||||
Domain.LMS_SETUP.ATTR_LMS_TYPE,
|
Domain.LMS_SETUP.ATTR_LMS_TYPE,
|
||||||
|
@ -291,7 +291,7 @@ public class LmsSetupForm implements TemplateComposer {
|
||||||
.withEntityKey(entityKey)
|
.withEntityKey(entityKey)
|
||||||
.withExec(action -> {
|
.withExec(action -> {
|
||||||
this.testAdHoc(action, formHandle);
|
this.testAdHoc(action, formHandle);
|
||||||
PageAction newAction = formHandle.saveAndActivate(action);
|
final PageAction newAction = formHandle.saveAndActivate(action);
|
||||||
pageContext.publishInfo(LMS_SETUP_TEST_OK);
|
pageContext.publishInfo(LMS_SETUP_TEST_OK);
|
||||||
return newAction;
|
return newAction;
|
||||||
})
|
})
|
||||||
|
@ -349,7 +349,10 @@ public class LmsSetupForm implements TemplateComposer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return action;
|
return handleTestResult(
|
||||||
|
action,
|
||||||
|
Function.identity(),
|
||||||
|
result.getOrThrow());
|
||||||
}
|
}
|
||||||
|
|
||||||
/** LmsSetup test action implementation */
|
/** LmsSetup test action implementation */
|
||||||
|
|
|
@ -107,7 +107,7 @@ final class OpenEdxRestTemplateFactory {
|
||||||
.filter(Result::hasValue)
|
.filter(Result::hasValue)
|
||||||
.findFirst()
|
.findFirst()
|
||||||
.orElse(Result.ofRuntimeError(
|
.orElse(Result.ofRuntimeError(
|
||||||
"Failed to find gain any access on paths: " + this.knownTokenAccessPaths));
|
"Failed to gain any access on paths: " + this.knownTokenAccessPaths));
|
||||||
}
|
}
|
||||||
|
|
||||||
Result<OAuth2RestTemplate> createOAuthRestTemplate(final String accessTokenPath) {
|
Result<OAuth2RestTemplate> createOAuthRestTemplate(final String accessTokenPath) {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
spring.application.name=SEB Server
|
spring.application.name=SEB Server
|
||||||
spring.profiles.active=dev
|
spring.profiles.active=dev
|
||||||
sebserver.version=0.6.0 RC
|
sebserver.version=0.6.1 (RC for v1.0)
|
||||||
|
|
||||||
##########################################################
|
##########################################################
|
||||||
### Global Server Settings
|
### Global Server Settings
|
||||||
|
|
|
@ -23,8 +23,6 @@ import java.util.Map;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import ch.ethz.seb.sebserver.gbl.model.sebconfig.ConfigCreationInfo;
|
|
||||||
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.examconfig.*;
|
|
||||||
import org.apache.commons.codec.Charsets;
|
import org.apache.commons.codec.Charsets;
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
import org.apache.commons.lang3.BooleanUtils;
|
import org.apache.commons.lang3.BooleanUtils;
|
||||||
|
@ -56,6 +54,7 @@ import ch.ethz.seb.sebserver.gbl.model.exam.QuizData;
|
||||||
import ch.ethz.seb.sebserver.gbl.model.institution.Institution;
|
import ch.ethz.seb.sebserver.gbl.model.institution.Institution;
|
||||||
import ch.ethz.seb.sebserver.gbl.model.institution.LmsSetup;
|
import ch.ethz.seb.sebserver.gbl.model.institution.LmsSetup;
|
||||||
import ch.ethz.seb.sebserver.gbl.model.institution.LmsSetup.LmsType;
|
import ch.ethz.seb.sebserver.gbl.model.institution.LmsSetup.LmsType;
|
||||||
|
import ch.ethz.seb.sebserver.gbl.model.sebconfig.ConfigCreationInfo;
|
||||||
import ch.ethz.seb.sebserver.gbl.model.sebconfig.Configuration;
|
import ch.ethz.seb.sebserver.gbl.model.sebconfig.Configuration;
|
||||||
import ch.ethz.seb.sebserver.gbl.model.sebconfig.ConfigurationAttribute;
|
import ch.ethz.seb.sebserver.gbl.model.sebconfig.ConfigurationAttribute;
|
||||||
import ch.ethz.seb.sebserver.gbl.model.sebconfig.ConfigurationNode;
|
import ch.ethz.seb.sebserver.gbl.model.sebconfig.ConfigurationNode;
|
||||||
|
@ -105,6 +104,32 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.clientconfig.
|
||||||
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.clientconfig.GetClientConfigPage;
|
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.clientconfig.GetClientConfigPage;
|
||||||
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.clientconfig.NewClientConfig;
|
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.clientconfig.NewClientConfig;
|
||||||
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.clientconfig.SaveClientConfig;
|
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.clientconfig.SaveClientConfig;
|
||||||
|
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.examconfig.CopyConfiguration;
|
||||||
|
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.examconfig.ExportPlainXML;
|
||||||
|
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.examconfig.GetConfigAttributes;
|
||||||
|
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.examconfig.GetConfigurationPage;
|
||||||
|
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.examconfig.GetConfigurationTableValues;
|
||||||
|
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.examconfig.GetConfigurationValuePage;
|
||||||
|
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.examconfig.GetConfigurationValues;
|
||||||
|
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.examconfig.GetConfigurations;
|
||||||
|
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.examconfig.GetExamConfigNode;
|
||||||
|
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.examconfig.GetExamConfigNodePage;
|
||||||
|
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.examconfig.GetFollowupConfiguration;
|
||||||
|
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.examconfig.GetOrientationPage;
|
||||||
|
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.examconfig.GetOrientations;
|
||||||
|
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.examconfig.GetTemplateAttribute;
|
||||||
|
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.examconfig.GetTemplateAttributePage;
|
||||||
|
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.examconfig.GetViewList;
|
||||||
|
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.examconfig.GetViewPage;
|
||||||
|
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.examconfig.GetViews;
|
||||||
|
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.examconfig.ImportExamConfigOnExistingConfig;
|
||||||
|
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.examconfig.ImportNewExamConfig;
|
||||||
|
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.examconfig.NewExamConfig;
|
||||||
|
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.examconfig.SaveExamConfig;
|
||||||
|
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.examconfig.SaveExamConfigHistory;
|
||||||
|
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.examconfig.SaveExamConfigTableValues;
|
||||||
|
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.examconfig.SaveExamConfigValue;
|
||||||
|
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.examconfig.SebExamConfigUndo;
|
||||||
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.useraccount.ActivateUserAccount;
|
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.useraccount.ActivateUserAccount;
|
||||||
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.useraccount.ChangePassword;
|
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.useraccount.ChangePassword;
|
||||||
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.useraccount.GetUserAccount;
|
import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.useraccount.GetUserAccount;
|
||||||
|
@ -1396,7 +1421,7 @@ public class UseCasesIntegrationTest extends GuiIntegrationTest {
|
||||||
.getOrThrow();
|
.getOrThrow();
|
||||||
assertNotNull(fallow_up);
|
assertNotNull(fallow_up);
|
||||||
|
|
||||||
List<ConfigurationValue> values = restService.getBuilder(GetConfigurationValues.class)
|
final List<ConfigurationValue> values = restService.getBuilder(GetConfigurationValues.class)
|
||||||
.withQueryParam(
|
.withQueryParam(
|
||||||
ConfigurationValue.FILTER_ATTR_CONFIGURATION_ID,
|
ConfigurationValue.FILTER_ATTR_CONFIGURATION_ID,
|
||||||
String.valueOf(fallow_up.id))
|
String.valueOf(fallow_up.id))
|
||||||
|
@ -1408,44 +1433,36 @@ public class UseCasesIntegrationTest extends GuiIntegrationTest {
|
||||||
.stream()
|
.stream()
|
||||||
.filter(attr -> "URLFilterEnable".equals(attr.name))
|
.filter(attr -> "URLFilterEnable".equals(attr.name))
|
||||||
.findFirst()
|
.findFirst()
|
||||||
.ifPresentOrElse(
|
.ifPresent(
|
||||||
attr -> {
|
attr -> {
|
||||||
values.stream()
|
values.stream()
|
||||||
.filter(cv -> cv.attributeId.equals(attr.id))
|
.filter(cv -> cv.attributeId.equals(attr.id))
|
||||||
.findFirst()
|
.findFirst()
|
||||||
.ifPresentOrElse(
|
.ifPresent(
|
||||||
val -> assertEquals(Constants.TRUE_STRING, val.value),
|
val -> assertEquals(Constants.TRUE_STRING, val.value));
|
||||||
() -> fail("Expect to find one value")
|
});
|
||||||
);
|
|
||||||
},
|
|
||||||
() -> fail("Expect to find one attribute")
|
|
||||||
);
|
|
||||||
|
|
||||||
attributes
|
attributes
|
||||||
.stream()
|
.stream()
|
||||||
.filter(attr -> "URLFilterRules".equals(attr.name))
|
.filter(attr -> "URLFilterRules".equals(attr.name))
|
||||||
.findFirst()
|
.findFirst()
|
||||||
.ifPresentOrElse(
|
.ifPresent(
|
||||||
parent -> {
|
parent -> {
|
||||||
attributes.stream()
|
attributes.stream()
|
||||||
.filter(attr -> parent.id.equals(attr.parentId) && "URLFilterRules.expression".equals(attr.name))
|
.filter(attr -> parent.id.equals(attr.parentId)
|
||||||
|
&& "URLFilterRules.expression".equals(attr.name))
|
||||||
.findFirst()
|
.findFirst()
|
||||||
.ifPresentOrElse(
|
.ifPresent(
|
||||||
tAttr -> {
|
tAttr -> {
|
||||||
values.stream()
|
values.stream()
|
||||||
.filter(tVal -> tVal.attributeId.equals(tAttr.id) && tVal.listIndex == 0)
|
.filter(tVal -> tVal.attributeId.equals(tAttr.id)
|
||||||
.findFirst()
|
&& tVal.listIndex == 0)
|
||||||
.ifPresentOrElse(
|
.findFirst()
|
||||||
firstTVal -> assertEquals("jrtjrtzj", firstTVal.value),
|
.ifPresent(
|
||||||
() -> fail("Expect to find one value")
|
firstTVal -> assertEquals("jrtjrtzj", firstTVal.value));
|
||||||
);
|
});
|
||||||
},
|
|
||||||
() -> fail("Expect to find one attribute")
|
|
||||||
);
|
|
||||||
|
|
||||||
},
|
});
|
||||||
() -> fail("Expect to find one attribute")
|
|
||||||
);
|
|
||||||
|
|
||||||
// import with the same name should cause an exception
|
// import with the same name should cause an exception
|
||||||
try {
|
try {
|
||||||
|
@ -1570,29 +1587,28 @@ public class UseCasesIntegrationTest extends GuiIntegrationTest {
|
||||||
final ConfigurationNode configurationNode = page.content.get(0);
|
final ConfigurationNode configurationNode = page.content.get(0);
|
||||||
assertEquals("New Exam Config", configurationNode.name);
|
assertEquals("New Exam Config", configurationNode.name);
|
||||||
|
|
||||||
ConfigCreationInfo copyInfo = new ConfigCreationInfo(
|
final ConfigCreationInfo copyInfo = new ConfigCreationInfo(
|
||||||
configurationNode.id,
|
configurationNode.id,
|
||||||
"Config Template",
|
"Config Template",
|
||||||
"Test Config Template creation",
|
"Test Config Template creation",
|
||||||
false,
|
false,
|
||||||
ConfigurationType.TEMPLATE
|
ConfigurationType.TEMPLATE);
|
||||||
);
|
|
||||||
|
|
||||||
ConfigurationNode template = restService
|
final ConfigurationNode template = restService
|
||||||
.getBuilder(CopyConfiguration.class)
|
.getBuilder(CopyConfiguration.class)
|
||||||
.withBody(copyInfo)
|
.withBody(copyInfo)
|
||||||
.call()
|
.call()
|
||||||
.getOrThrow();
|
.getOrThrow();
|
||||||
assertNotNull(template);
|
assertNotNull(template);
|
||||||
// get template page and check new template is available
|
// get template page and check new template is available
|
||||||
Page<ConfigurationNode> templates = restService
|
final Page<ConfigurationNode> templates = restService
|
||||||
.getBuilder(GetExamConfigNodePage.class)
|
.getBuilder(GetExamConfigNodePage.class)
|
||||||
.withQueryParam(ConfigurationNode.FILTER_ATTR_TYPE, ConfigurationType.TEMPLATE.name())
|
.withQueryParam(ConfigurationNode.FILTER_ATTR_TYPE, ConfigurationType.TEMPLATE.name())
|
||||||
.call()
|
.call()
|
||||||
.getOrThrow();
|
.getOrThrow();
|
||||||
assertNotNull(templates);
|
assertNotNull(templates);
|
||||||
assertFalse(templates.isEmpty());
|
assertFalse(templates.isEmpty());
|
||||||
ConfigurationNode newTemplate = templates.content.get(0);
|
final ConfigurationNode newTemplate = templates.content.get(0);
|
||||||
assertNotNull(newTemplate);
|
assertNotNull(newTemplate);
|
||||||
assertEquals("Config Template", newTemplate.name);
|
assertEquals("Config Template", newTemplate.name);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue