This is the codeAbility Sharing Platform! Learn more about the codeAbility Sharing Platform.

Skip to content
Snippets Groups Projects
Commit 86c1681e authored by Philipp Gritsch's avatar Philipp Gritsch
Browse files

Merge branch 'development' into 'master'

Development

See merge request !274
parents 37a34a9d ae072ad1
Branches
1 merge request!274Development
......@@ -60,7 +60,7 @@ import org.springframework.web.util.UriComponentsBuilder;
@Service
@Validated
@SuppressWarnings({ "PMD.AvoidDuplicateLiterals", "PMD.TooManyMethods" })
@SuppressWarnings({ "PMD.AvoidDuplicateLiterals", "PMD.TooManyMethods", "PMD.CyclomaticComplexity" })
public class EduSharingService {
private static final String DEFAULT_VERSION = "1.4";
......@@ -365,7 +365,7 @@ public class EduSharingService {
return dto;
}
@SuppressWarnings({ "PMD.AvoidCatchingGenericException", "PMD.PreserveStackTrace" })
@SuppressWarnings({ "PMD.AvoidCatchingGenericException", "PMD.PreserveStackTrace", "PMD.ConfusingTernary" })
private void deleteNodeSilently(@NotNull String nodeId) {
try {
final var uri = UriComponentsBuilder
......@@ -378,8 +378,8 @@ public class EduSharingService {
ResponseEntity<String> response = answer.toEntity(String.class).block();
if (response == null || !response.getStatusCode().is2xxSuccessful()) {
LOGGER.error("DELETE request to " + uri + " failed!");
LOGGER.error(response.getBody());
String responseText = response != null ? response.getBody() : "Null response";
LOGGER.error("DELETE request to " + uri + " failed! Response: " + responseText);
}
} catch (final Exception e) {
LOGGER.error("Error on deleteNode for resource " + nodeId, e);
......@@ -566,6 +566,7 @@ public class EduSharingService {
.block();
}
@SuppressWarnings("PMD.ConfusingTernary")
private void addOrUpdatePermissionsToCuratorGroup(@NotNull final String nodeId) throws JsonProcessingException {
final GetPermissionAnswerDTO currentPermissions = getCurrentPermissionsForNode(nodeId);
LocalPermissionDTO localPermissions = currentPermissions.getLocalPermissions();
......@@ -590,8 +591,8 @@ public class EduSharingService {
ResponseEntity<String> response = answer.toEntity(String.class).block();
if (response == null || !response.getStatusCode().is2xxSuccessful()) {
LOGGER.error("POST request to " + uri + " failed!");
LOGGER.error(response.getBody());
String responseText = response != null ? response.getBody() : "Null response";
LOGGER.error("POST request to " + uri + " failed! Response: " + responseText);
}
}
......
......@@ -180,3 +180,10 @@ application:
oeResource:
oerLink: https://oeresource.logic.at
apiLink: https://oeresource.logic.at/en/meta/api/v1?format=json
edu-sharing-integration:
enabled: true
base-url: 'https://oer-repo.uibk.ac.at/edu-sharing/'
content:
repository: 'oer-repo.uibk.ac.at'
base-node: 'bb7ffd27-1946-4013-96d6-87037ef04478'
......@@ -362,7 +362,7 @@
</h6>
<span *ngIf="eduSharingStatus?.publishedCopies?.length == 0">
<i>{{ 'exercise.export.edu-sharing.publishedProjects.noEntries' | translate }}</i>
<em>{{ 'exercise.export.edu-sharing.publishedProjects.noEntries' | translate }}</em>
</span>
<table
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment