SEBSERV-417 testing

This commit is contained in:
anhefti 2024-06-19 14:19:13 +02:00
parent a8185095f2
commit 9d93826a35
2 changed files with 4 additions and 3 deletions

View file

@ -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;

View file

@ -232,6 +232,7 @@ public class MoodlePluginFullIntegration implements FullLmsIntegrationAPI {
final String fileName = getConnectionConfigFileName(exam);
final MultiValueMap<String, Object> 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();