diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ExamDAOImpl.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ExamDAOImpl.java index f9f1d6bb..666487df 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ExamDAOImpl.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ExamDAOImpl.java @@ -62,7 +62,7 @@ import ch.ethz.seb.sebserver.webservice.servicelayer.dao.FilterMap; import ch.ethz.seb.sebserver.webservice.servicelayer.dao.TransactionHandler; import ch.ethz.seb.sebserver.webservice.servicelayer.lms.LmsAPIService; import ch.ethz.seb.sebserver.webservice.servicelayer.lms.LmsAPITemplate; -import ch.ethz.seb.sebserver.webservice.servicelayer.lms.impl.moodle.MoodleCourseAccess; +import ch.ethz.seb.sebserver.webservice.servicelayer.lms.impl.moodle.legacy.MoodleCourseAccess; @Lazy @Component diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/MoodleLmsAPITemplateFactory.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/MoodleLmsAPITemplateFactory.java index 3df814d7..6db52389 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/MoodleLmsAPITemplateFactory.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/MoodleLmsAPITemplateFactory.java @@ -28,12 +28,20 @@ import ch.ethz.seb.sebserver.webservice.servicelayer.lms.APITemplateDataSupplier import ch.ethz.seb.sebserver.webservice.servicelayer.lms.LmsAPITemplate; import ch.ethz.seb.sebserver.webservice.servicelayer.lms.LmsAPITemplateFactory; import ch.ethz.seb.sebserver.webservice.servicelayer.lms.impl.LmsAPITemplateAdapter; +import ch.ethz.seb.sebserver.webservice.servicelayer.lms.impl.moodle.legacy.MoodleCourseAccess; +import ch.ethz.seb.sebserver.webservice.servicelayer.lms.impl.moodle.legacy.MoodleCourseDataAsyncLoader; +import ch.ethz.seb.sebserver.webservice.servicelayer.lms.impl.moodle.legacy.MoodleCourseRestriction; +import ch.ethz.seb.sebserver.webservice.servicelayer.lms.impl.moodle.legacy.MoodleRestTemplateFactory; +import ch.ethz.seb.sebserver.webservice.servicelayer.lms.impl.moodle.plugin.MoodlePluginCheck; +import ch.ethz.seb.sebserver.webservice.servicelayer.lms.impl.moodle.plugin.MoodlePluginCourseAccess; +import ch.ethz.seb.sebserver.webservice.servicelayer.lms.impl.moodle.plugin.MoodlePluginCourseRestriction; @Lazy @Service @WebServiceProfile public class MoodleLmsAPITemplateFactory implements LmsAPITemplateFactory { + private final MoodlePluginCheck moodlePluginCheck; private final JSONMapper jsonMapper; private final AsyncService asyncService; private final Environment environment; @@ -43,6 +51,7 @@ public class MoodleLmsAPITemplateFactory implements LmsAPITemplateFactory { private final String[] alternativeTokenRequestPaths; protected MoodleLmsAPITemplateFactory( + final MoodlePluginCheck moodlePluginCheck, final JSONMapper jsonMapper, final AsyncService asyncService, final Environment environment, @@ -51,6 +60,7 @@ public class MoodleLmsAPITemplateFactory implements LmsAPITemplateFactory { final ApplicationContext applicationContext, @Value("${sebserver.webservice.lms.moodle.api.token.request.paths:}") final String alternativeTokenRequestPaths) { + this.moodlePluginCheck = moodlePluginCheck; this.jsonMapper = jsonMapper; this.asyncService = asyncService; this.environment = environment; @@ -73,34 +83,48 @@ public class MoodleLmsAPITemplateFactory implements LmsAPITemplateFactory { return Result.tryCatch(() -> { final LmsSetup lmsSetup = apiTemplateDataSupplier.getLmsSetup(); - final MoodleCourseDataAsyncLoader asyncLoaderPrototype = this.applicationContext .getBean(MoodleCourseDataAsyncLoader.class); asyncLoaderPrototype.init(lmsSetup.getModelId()); - final MoodleRestTemplateFactory moodleRestTemplateFactory = new MoodleRestTemplateFactory( - this.jsonMapper, - apiTemplateDataSupplier, - this.clientCredentialService, - this.clientHttpRequestFactoryService, - this.alternativeTokenRequestPaths); + if (this.moodlePluginCheck.checkPluginAvailable(lmsSetup)) { - final MoodleCourseAccess moodleCourseAccess = new MoodleCourseAccess( - this.jsonMapper, - moodleRestTemplateFactory, - asyncLoaderPrototype, - this.environment); + final MoodlePluginCourseAccess moodlePluginCourseAccess = new MoodlePluginCourseAccess(); + final MoodlePluginCourseRestriction moodlePluginCourseRestriction = new MoodlePluginCourseRestriction(); - final MoodleCourseRestriction moodleCourseRestriction = new MoodleCourseRestriction( - this.jsonMapper, - moodleRestTemplateFactory); + return new LmsAPITemplateAdapter( + this.asyncService, + this.environment, + apiTemplateDataSupplier, + moodlePluginCourseAccess, + moodlePluginCourseRestriction); - return new LmsAPITemplateAdapter( - this.asyncService, - this.environment, - apiTemplateDataSupplier, - moodleCourseAccess, - moodleCourseRestriction); + } else { + + final MoodleRestTemplateFactory moodleRestTemplateFactory = new MoodleRestTemplateFactory( + this.jsonMapper, + apiTemplateDataSupplier, + this.clientCredentialService, + this.clientHttpRequestFactoryService, + this.alternativeTokenRequestPaths); + + final MoodleCourseAccess moodleCourseAccess = new MoodleCourseAccess( + this.jsonMapper, + moodleRestTemplateFactory, + asyncLoaderPrototype, + this.environment); + + final MoodleCourseRestriction moodleCourseRestriction = new MoodleCourseRestriction( + this.jsonMapper, + moodleRestTemplateFactory); + + return new LmsAPITemplateAdapter( + this.asyncService, + this.environment, + apiTemplateDataSupplier, + moodleCourseAccess, + moodleCourseRestriction); + } }); } diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/MoodleCourseAccess.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/legacy/MoodleCourseAccess.java similarity index 99% rename from src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/MoodleCourseAccess.java rename to src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/legacy/MoodleCourseAccess.java index 8f034416..6e98b0b0 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/MoodleCourseAccess.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/legacy/MoodleCourseAccess.java @@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package ch.ethz.seb.sebserver.webservice.servicelayer.lms.impl.moodle; +package ch.ethz.seb.sebserver.webservice.servicelayer.lms.impl.moodle.legacy; import java.util.ArrayList; import java.util.Collection; @@ -47,9 +47,9 @@ import ch.ethz.seb.sebserver.gbl.util.Utils; import ch.ethz.seb.sebserver.webservice.servicelayer.dao.FilterMap; import ch.ethz.seb.sebserver.webservice.servicelayer.lms.APITemplateDataSupplier; import ch.ethz.seb.sebserver.webservice.servicelayer.lms.CourseAccessAPI; -import ch.ethz.seb.sebserver.webservice.servicelayer.lms.impl.moodle.MoodleCourseDataAsyncLoader.CourseDataShort; -import ch.ethz.seb.sebserver.webservice.servicelayer.lms.impl.moodle.MoodleCourseDataAsyncLoader.CourseQuizShort; -import ch.ethz.seb.sebserver.webservice.servicelayer.lms.impl.moodle.MoodleRestTemplateFactory.MoodleAPIRestTemplate; +import ch.ethz.seb.sebserver.webservice.servicelayer.lms.impl.moodle.legacy.MoodleCourseDataAsyncLoader.CourseDataShort; +import ch.ethz.seb.sebserver.webservice.servicelayer.lms.impl.moodle.legacy.MoodleCourseDataAsyncLoader.CourseQuizShort; +import ch.ethz.seb.sebserver.webservice.servicelayer.lms.impl.moodle.legacy.MoodleRestTemplateFactory.MoodleAPIRestTemplate; /** Implements the LmsAPITemplate for Open edX LMS Course API access. * @@ -94,7 +94,7 @@ public class MoodleCourseAccess implements CourseAccessAPI { private MoodleAPIRestTemplate restTemplate; - protected MoodleCourseAccess( + public MoodleCourseAccess( final JSONMapper jsonMapper, final MoodleRestTemplateFactory moodleRestTemplateFactory, final MoodleCourseDataAsyncLoader moodleCourseDataAsyncLoader, diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/MoodleCourseDataAsyncLoader.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/legacy/MoodleCourseDataAsyncLoader.java similarity index 96% rename from src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/MoodleCourseDataAsyncLoader.java rename to src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/legacy/MoodleCourseDataAsyncLoader.java index 290afbc2..35056b6f 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/MoodleCourseDataAsyncLoader.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/legacy/MoodleCourseDataAsyncLoader.java @@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package ch.ethz.seb.sebserver.webservice.servicelayer.lms.impl.moodle; +package ch.ethz.seb.sebserver.webservice.servicelayer.lms.impl.moodle.legacy; import java.io.IOException; import java.util.ArrayList; @@ -47,8 +47,8 @@ import ch.ethz.seb.sebserver.gbl.async.AsyncService; import ch.ethz.seb.sebserver.gbl.async.CircuitBreaker; import ch.ethz.seb.sebserver.gbl.profile.WebServiceProfile; import ch.ethz.seb.sebserver.gbl.util.Utils; -import ch.ethz.seb.sebserver.webservice.servicelayer.lms.impl.moodle.MoodleCourseAccess.Warning; -import ch.ethz.seb.sebserver.webservice.servicelayer.lms.impl.moodle.MoodleRestTemplateFactory.MoodleAPIRestTemplate; +import ch.ethz.seb.sebserver.webservice.servicelayer.lms.impl.moodle.legacy.MoodleCourseAccess.Warning; +import ch.ethz.seb.sebserver.webservice.servicelayer.lms.impl.moodle.legacy.MoodleRestTemplateFactory.MoodleAPIRestTemplate; @Lazy @Component diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/MoodleCourseRestriction.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/legacy/MoodleCourseRestriction.java similarity index 96% rename from src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/MoodleCourseRestriction.java rename to src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/legacy/MoodleCourseRestriction.java index 44716a0f..ccff2e87 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/MoodleCourseRestriction.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/legacy/MoodleCourseRestriction.java @@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package ch.ethz.seb.sebserver.webservice.servicelayer.lms.impl.moodle; +package ch.ethz.seb.sebserver.webservice.servicelayer.lms.impl.moodle.legacy; import java.util.ArrayList; @@ -30,7 +30,7 @@ import ch.ethz.seb.sebserver.gbl.model.institution.LmsSetupTestResult; import ch.ethz.seb.sebserver.gbl.util.Result; import ch.ethz.seb.sebserver.webservice.servicelayer.lms.SEBRestrictionAPI; import ch.ethz.seb.sebserver.webservice.servicelayer.lms.impl.NoSEBRestrictionException; -import ch.ethz.seb.sebserver.webservice.servicelayer.lms.impl.moodle.MoodleRestTemplateFactory.MoodleAPIRestTemplate; +import ch.ethz.seb.sebserver.webservice.servicelayer.lms.impl.moodle.legacy.MoodleRestTemplateFactory.MoodleAPIRestTemplate; /** GET: * http://yourmoodle.org/webservice/rest/server.php?wstoken={token}&moodlewsrestformat=json&wsfunction=seb_restriction&courseId=123 @@ -79,7 +79,7 @@ public class MoodleCourseRestriction implements SEBRestrictionAPI { private MoodleAPIRestTemplate restTemplate; - protected MoodleCourseRestriction( + public MoodleCourseRestriction( final JSONMapper jsonMapper, final MoodleRestTemplateFactory moodleRestTemplateFactory) { diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/MoodleRestTemplateFactory.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/legacy/MoodleRestTemplateFactory.java similarity index 99% rename from src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/MoodleRestTemplateFactory.java rename to src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/legacy/MoodleRestTemplateFactory.java index 39fc9654..5de31e82 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/MoodleRestTemplateFactory.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/legacy/MoodleRestTemplateFactory.java @@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package ch.ethz.seb.sebserver.webservice.servicelayer.lms.impl.moodle; +package ch.ethz.seb.sebserver.webservice.servicelayer.lms.impl.moodle.legacy; import java.util.ArrayList; import java.util.Arrays; @@ -53,7 +53,7 @@ import ch.ethz.seb.sebserver.gbl.util.Result; import ch.ethz.seb.sebserver.gbl.util.Utils; import ch.ethz.seb.sebserver.webservice.servicelayer.lms.APITemplateDataSupplier; -class MoodleRestTemplateFactory { +public class MoodleRestTemplateFactory { private static final Logger log = LoggerFactory.getLogger(MoodleRestTemplateFactory.class); diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/plugin/MoodlePluginCheck.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/plugin/MoodlePluginCheck.java new file mode 100644 index 00000000..f0f9955b --- /dev/null +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/plugin/MoodlePluginCheck.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2022 ETH Zürich, Educational Development and Technology (LET) + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +package ch.ethz.seb.sebserver.webservice.servicelayer.lms.impl.moodle.plugin; + +import org.springframework.context.annotation.Lazy; +import org.springframework.stereotype.Service; + +import ch.ethz.seb.sebserver.gbl.model.institution.LmsSetup; +import ch.ethz.seb.sebserver.gbl.profile.WebServiceProfile; + +@Lazy +@Service +@WebServiceProfile +public class MoodlePluginCheck { + + /** Used to check if the moodle SEB Server plugin is available for a given LMSSetup. + * + * @param lmsSetup The LMS Setup + * @return true if the SEB Server plugin is available */ + public boolean checkPluginAvailable(final LmsSetup lmsSetup) { + // TODO check if the moodle plugin is installed for the specified LMS Setup + return false; + } + +} diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/plugin/MoodlePluginCourseAccess.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/plugin/MoodlePluginCourseAccess.java new file mode 100644 index 00000000..83dc3ba2 --- /dev/null +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/plugin/MoodlePluginCourseAccess.java @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2022 ETH Zürich, Educational Development and Technology (LET) + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +package ch.ethz.seb.sebserver.webservice.servicelayer.lms.impl.moodle.plugin; + +import java.util.Collection; +import java.util.List; +import java.util.Set; + +import ch.ethz.seb.sebserver.gbl.model.exam.Chapters; +import ch.ethz.seb.sebserver.gbl.model.exam.QuizData; +import ch.ethz.seb.sebserver.gbl.model.institution.LmsSetupTestResult; +import ch.ethz.seb.sebserver.gbl.model.user.ExamineeAccountDetails; +import ch.ethz.seb.sebserver.gbl.util.Result; +import ch.ethz.seb.sebserver.webservice.servicelayer.dao.FilterMap; +import ch.ethz.seb.sebserver.webservice.servicelayer.lms.CourseAccessAPI; + +public class MoodlePluginCourseAccess implements CourseAccessAPI { + + @Override + public LmsSetupTestResult testCourseAccessAPI() { + // TODO Auto-generated method stub + return null; + } + + @Override + public Result> getQuizzes(final FilterMap filterMap) { + // TODO Auto-generated method stub + return null; + } + + @Override + public Result> getQuizzes(final Set ids) { + // TODO Auto-generated method stub + return null; + } + + @Override + public Result getQuiz(final String id) { + // TODO Auto-generated method stub + return null; + } + + @Override + public void clearCourseCache() { + // TODO Auto-generated method stub + + } + + @Override + public Result getExamineeAccountDetails(final String examineeUserId) { + // TODO Auto-generated method stub + return null; + } + + @Override + public String getExamineeName(final String examineeUserId) { + // TODO Auto-generated method stub + return null; + } + + @Override + public Result getCourseChapters(final String courseId) { + // TODO Auto-generated method stub + return null; + } + +} diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/plugin/MoodlePluginCourseRestriction.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/plugin/MoodlePluginCourseRestriction.java new file mode 100644 index 00000000..d2eeb5e3 --- /dev/null +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/plugin/MoodlePluginCourseRestriction.java @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2022 ETH Zürich, Educational Development and Technology (LET) + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +package ch.ethz.seb.sebserver.webservice.servicelayer.lms.impl.moodle.plugin; + +import ch.ethz.seb.sebserver.gbl.model.exam.Exam; +import ch.ethz.seb.sebserver.gbl.model.exam.SEBRestriction; +import ch.ethz.seb.sebserver.gbl.model.institution.LmsSetupTestResult; +import ch.ethz.seb.sebserver.gbl.util.Result; +import ch.ethz.seb.sebserver.webservice.servicelayer.lms.SEBRestrictionAPI; + +public class MoodlePluginCourseRestriction implements SEBRestrictionAPI { + + @Override + public LmsSetupTestResult testCourseRestrictionAPI() { + // TODO Auto-generated method stub + return null; + } + + @Override + public Result getSEBClientRestriction(final Exam exam) { + // TODO Auto-generated method stub + return null; + } + + @Override + public Result applySEBClientRestriction(final String externalExamId, + final SEBRestriction sebRestrictionData) { + // TODO Auto-generated method stub + return null; + } + + @Override + public Result releaseSEBClientRestriction(final Exam exam) { + // TODO Auto-generated method stub + return null; + } + +} diff --git a/src/test/java/ch/ethz/seb/sebserver/gui/integration/UseCasesIntegrationTest.java b/src/test/java/ch/ethz/seb/sebserver/gui/integration/UseCasesIntegrationTest.java index b837b219..3965aa8e 100644 --- a/src/test/java/ch/ethz/seb/sebserver/gui/integration/UseCasesIntegrationTest.java +++ b/src/test/java/ch/ethz/seb/sebserver/gui/integration/UseCasesIntegrationTest.java @@ -27,7 +27,6 @@ import java.util.UUID; import java.util.function.Function; import java.util.stream.Collectors; -import org.apache.commons.codec.Charsets; import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.StringUtils; @@ -1555,7 +1554,7 @@ public class UseCasesIntegrationTest extends GuiIntegrationTest { .withURIVariable(API.PARAM_MODEL_ID, configurationNode.getModelId()) .withResponseExtractor(response -> { final InputStream input = response.getBody(); - final String xmlString = StreamUtils.copyToString(input, Charsets.UTF_8); + final String xmlString = StreamUtils.copyToString(input, java.nio.charset.StandardCharsets.UTF_8); assertNotNull(xmlString); for (final ConfigurationAttribute attribute : attributes) { if (attribute.name.contains(".") || attribute.name.equals("kioskMode")) { @@ -2078,7 +2077,7 @@ public class UseCasesIntegrationTest extends GuiIntegrationTest { .withURIVariable(API.PARAM_PARENT_MODEL_ID, String.valueOf(examConfigurationMap.examId)) .withResponseExtractor(response -> { final InputStream input = response.getBody(); - final String xmlString = StreamUtils.copyToString(input, Charsets.UTF_8); + final String xmlString = StreamUtils.copyToString(input, java.nio.charset.StandardCharsets.UTF_8); assertNotNull(xmlString); // assertEquals( // "allowAudioCaptureallowBrowsingBackForwardallowDictationallowDictionaryLookupallowDisplayMirroringallowDownUploadsallowedDisplayBuiltinallowedDisplaysMaxNumber1allowFlashFullscreenallowiOSBetaVersionNumber0allowiOSVersionNumberMajor9allowiOSVersionNumberMinor3allowiOSVersionNumberPatch5allowPDFPlugInallowPreferencesWindowallowQuitallowScreenSharingallowSiriallowSpellCheckallowSpellCheckDictionaryda-DKen-AUen-GBen-USes-ESfr-FRpt-PTsv-SEsv-FIallowSwitchToApplicationsallowUserAppFolderInstallallowUserSwitchingallowVideoCaptureallowVirtualMachineallowWlanaudioControlEnabledaudioMuteaudioSetVolumeLevelaudioVolumeLevel25blacklistURLFilterblockPopUpWindowsbrowserMessagingPingTime120000browserMessagingSocketws://localhost:8706browserScreenKeyboardbrowserURLSaltbrowserUserAgentbrowserUserAgentiOS0browserUserAgentiOSCustombrowserUserAgentMac0browserUserAgentMacCustombrowserUserAgentWinDesktopMode0browserUserAgentWinDesktopModeCustombrowserUserAgentWinTouchMode0browserUserAgentWinTouchModeCustombrowserUserAgentWinTouchModeIPadMozilla/5.0 (iPad; CPU OS 12_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1.2 Mobile/15E148 Safari/604.1browserViewMode0browserWindowAllowReloadbrowserWindowShowURL0browserWindowTitleSuffixchooseFileToUploadPolicy0createNewDesktopdetectStoppedProcessdownloadAndOpenSebConfigdownloadDirectoryOSXdownloadDirectoryWindownloadPDFFilesenableAltEscenableAltF4enableAltMouseWheelenableAltTabenableAppSwitcherCheckenableBrowserWindowToolbarenableCtrlEscenableDrawingEditorenableEscenableF1enableF10enableF11enableF12enableF2enableF3enableF4enableF5enableF6enableF7enableF8enableF9enableJavaenableJavaScriptenableLoggingenablePlugInsenablePrintScreenenablePrivateClipboardenableRightMouseenableSebBrowserenableStartMenuenableTouchExitenableZoomPageenableZoomTextexamSessionClearCookiesOnEndexamSessionClearCookiesOnStartexitKey12exitKey210exitKey35forceAppFolderInstallhashedAdminPasswordhashedQuitPasswordhideBrowserWindowToolbarhookKeysignoreExitKeysinsideSebEnableChangeAPasswordinsideSebEnableEaseOfAccessinsideSebEnableLockThisComputerinsideSebEnableLogOffinsideSebEnableNetworkConnectionSelectorinsideSebEnableShutDowninsideSebEnableStartTaskManagerinsideSebEnableSwitchUserinsideSebEnableVmWareClientShadekillExplorerShelllockOnMessageSocketCloselogDirectoryOSXlogDirectoryWinlogLevel1mainBrowserWindowHeight100%mainBrowserWindowPositioning1mainBrowserWindowWidth100%minMacOSVersion0mobileAllowPictureInPictureMediaPlaybackmobileAllowQRCodeConfigmobileAllowSingleAppModemobileEnableASAMmobileEnableGuidedAccessLinkTransformmobilePreventAutoLockmobileShowSettingsmobileStatusBarAppearance1mobileStatusBarAppearanceExtended1monitorProcessesnewBrowserWindowAllowReloadnewBrowserWindowByLinkBlockForeignnewBrowserWindowByLinkHeight100%newBrowserWindowByLinkPolicy2newBrowserWindowByLinkPositioning2newBrowserWindowByLinkWidth100%newBrowserWindowByScriptBlockForeignnewBrowserWindowByScriptPolicy2newBrowserWindowNavigationnewBrowserWindowShowReloadWarningnewBrowserWindowShowURL1openDownloadsoriginatorVersionSEB_Server_0.3.0permittedProcessesactiveallowUserToChooseAppargumentsautostartdescriptionexecutablefirefox.exeiconInTaskbaridentifierFirefoxoriginalNamefirefox.exeos1path../xulrunner/runInBackgroundstrongKilltitleSEBpinEmbeddedCertificatesprohibitedProcessesactivecurrentUserdescriptionexecutableRiotidentifieroriginalNameRiotos1strongKilluseractivecurrentUserdescriptionexecutableseamonkeyidentifieroriginalNameseamonkeyos1strongKilluseractivecurrentUserdescriptionexecutableDiscordidentifieroriginalNameDiscordos1strongKilluseractivecurrentUserdescriptionexecutableSlackidentifieroriginalNameSlackos1strongKilluseractivecurrentUserdescriptionexecutableTeamsidentifieroriginalNameTeamsos1strongKilluseractivecurrentUserdescriptionexecutableCamRecorderidentifieroriginalNameCamRecorderos1strongKilluseractivecurrentUserdescriptionexecutablejoin.meidentifieroriginalNamejoin.meos1strongKilluseractivecurrentUserdescriptionexecutableRPCSuiteidentifieroriginalNameRPCSuiteos1strongKilluseractivecurrentUserdescriptionexecutableRPCServiceidentifieroriginalNameRPCServiceos1strongKilluseractivecurrentUserdescriptionexecutableRemotePCDesktopidentifieroriginalNameRemotePCDesktopos1strongKilluseractivecurrentUserdescriptionexecutablebeamyourscreen-hostidentifieroriginalNamebeamyourscreen-hostos1strongKilluseractivecurrentUserdescriptionexecutableAeroAdminidentifieroriginalNameAeroAdminos1strongKilluseractivecurrentUserdescriptionexecutableMikogo-hostidentifieroriginalNameMikogo-hostos1strongKilluseractivecurrentUserdescriptionexecutablechromotingidentifieroriginalNamechromotingos1strongKilluseractivecurrentUserdescriptionexecutablevncserveruiidentifieroriginalNamevncserveruios1strongKilluseractivecurrentUserdescriptionexecutablevncvieweridentifieroriginalNamevncvieweros1strongKilluseractivecurrentUserdescriptionexecutablevncserveridentifieroriginalNamevncserveros1strongKilluseractivecurrentUserdescriptionexecutableTeamVieweridentifieroriginalNameTeamVieweros1strongKilluseractivecurrentUserdescriptionexecutableGotoMeetingWinStoreidentifieroriginalNameGotoMeetingWinStoreos1strongKilluseractivecurrentUserdescriptionexecutableg2mcomm.exeidentifieroriginalNameg2mcomm.exeos1strongKilluseractivecurrentUserdescriptionexecutableSkypeHostidentifieroriginalNameSkypeHostos1strongKilluseractivecurrentUserdescriptionexecutableSkypeidentifieroriginalNameSkypeos1strongKilluserproxiesAutoConfigurationEnabledAutoConfigurationJavaScriptAutoConfigurationURLAutoDiscoveryEnabledExceptionsListExcludeSimpleHostnamesFTPEnableFTPPassiveFTPPasswordFTPPort21FTPProxyFTPRequiresPasswordFTPUsernameHTTPEnableHTTPPasswordHTTPPort80HTTPProxyHTTPRequiresPasswordHTTPSEnableHTTPSPasswordHTTPSPort443HTTPSProxyHTTPSRequiresPasswordHTTPSUsernameHTTPUsernameRTSPEnableRTSPPasswordRTSPPort554RTSPProxyRTSPRequiresPasswordRTSPUsernameSOCKSEnableSOCKSPasswordSOCKSPort1080SOCKSProxySOCKSRequiresPasswordSOCKSUsernameproxySettingsPolicy0quitURLquitURLConfirmremoveBrowserProfileremoveLocalStoragerestartExamPasswordProtectedrestartExamTextrestartExamURLrestartExamUseStartURLsebConfigPurpose0sebServicePolicy2sendBrowserExamKeyshowBackToStartButtonshowInputLanguageshowMenuBarshowNavigationButtonsshowReloadButtonshowReloadWarningshowScanQRCodeButtonshowSettingsInAppshowTaskBarshowTimestartResourcetaskBarHeight40touchOptimizedURLFilterEnableURLFilterEnableContentFilterURLFilterMessage0URLFilterRulesuseAsymmetricOnlyEncryptionwhitelistURLFilterzoomMode0", diff --git a/src/test/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/MoodleCourseAccessTest.java b/src/test/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/legacy/MoodleCourseAccessTest.java similarity index 96% rename from src/test/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/MoodleCourseAccessTest.java rename to src/test/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/legacy/MoodleCourseAccessTest.java index 74a1b617..5154e9b0 100644 --- a/src/test/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/MoodleCourseAccessTest.java +++ b/src/test/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/legacy/MoodleCourseAccessTest.java @@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package ch.ethz.seb.sebserver.webservice.servicelayer.lms.impl.moodle; +package ch.ethz.seb.sebserver.webservice.servicelayer.lms.impl.moodle.legacy; import static org.junit.Assert.*; import static org.mockito.ArgumentMatchers.*; @@ -27,7 +27,7 @@ import ch.ethz.seb.sebserver.gbl.model.institution.LmsSetupTestResult; import ch.ethz.seb.sebserver.gbl.model.institution.LmsSetupTestResult.ErrorType; import ch.ethz.seb.sebserver.gbl.model.user.ExamineeAccountDetails; import ch.ethz.seb.sebserver.gbl.util.Result; -import ch.ethz.seb.sebserver.webservice.servicelayer.lms.impl.moodle.MoodleRestTemplateFactory.MoodleAPIRestTemplate; +import ch.ethz.seb.sebserver.webservice.servicelayer.lms.impl.moodle.legacy.MoodleRestTemplateFactory.MoodleAPIRestTemplate; public class MoodleCourseAccessTest {