From 68be1b4322c8fbbb98c197828fd2bcd880310313 Mon Sep 17 00:00:00 2001 From: anhefti Date: Thu, 20 Jun 2024 09:56:40 +0200 Subject: [PATCH] SEBSERV-417 fix check full integration --- .../lms/impl/moodle/plugin/MoodlePluginFullIntegration.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 3c6a14c8..53f1ed7c 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 @@ -66,7 +66,10 @@ public class MoodlePluginFullIntegration implements FullLmsIntegrationAPI { @Override public boolean fullIntegrationActive() { - return false; + return this.restTemplateFactory + .getRestTemplate() + .map(template -> template.getMoodlePluginVersion() == MoodleAPIRestTemplate.MoodlePluginVersion.V2_0) + .getOr(false); } @Override