From 9d93826a357858ecad39faf8be6a69268e6b4034 Mon Sep 17 00:00:00 2001 From: anhefti Date: Wed, 19 Jun 2024 14:19:13 +0200 Subject: [PATCH] SEBSERV-417 testing --- .../servicelayer/lms/impl/FullLmsIntegrationServiceImpl.java | 4 +--- .../lms/impl/moodle/plugin/MoodlePluginFullIntegration.java | 3 +++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/FullLmsIntegrationServiceImpl.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/FullLmsIntegrationServiceImpl.java index ab388e17..2e03df52 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/FullLmsIntegrationServiceImpl.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/FullLmsIntegrationServiceImpl.java @@ -151,10 +151,8 @@ public class FullLmsIntegrationServiceImpl implements FullLmsIntegrationService return Result.tryCatch(() -> { final LmsSetup lmsSetup = lmsSetupDAO.byPK(exam.lmsSetupId).getOrThrow(); if (lmsSetup.lmsType.features.contains(LmsSetup.Features.LMS_FULL_INTEGRATION)) { - log.info("******************* applyConnectionConfiguration: {}", exam); - this.applyConnectionConfiguration(exam); - log.info("******************* applyExamData: {}", exam); this.applyExamData(exam, !exam.active); + this.applyConnectionConfiguration(exam); } return exam; diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/plugin/MoodlePluginFullIntegration.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/plugin/MoodlePluginFullIntegration.java index 7244883e..37c2e0cc 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/plugin/MoodlePluginFullIntegration.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/plugin/MoodlePluginFullIntegration.java @@ -232,6 +232,7 @@ public class MoodlePluginFullIntegration implements FullLmsIntegrationAPI { final String fileName = getConnectionConfigFileName(exam); + final MultiValueMap multiPartAttributes = new LinkedMultiValueMap<>(); multiPartAttributes.add("quizid", quizId); multiPartAttributes.add("name", fileName); @@ -243,6 +244,8 @@ public class MoodlePluginFullIntegration implements FullLmsIntegrationAPI { } }; + log.info("Upload Connection Configuration to Moodle: quizid: {}, fileName: {}, content: {}", quizId, fileName, contentsAsResource ); + multiPartAttributes.add("file", contentsAsResource); final MoodleAPIRestTemplate rest = getRestTemplate().getOrThrow();