From fbe7781be1c8237f8e4ea3a93eb77c5000c0e2ae Mon Sep 17 00:00:00 2001 From: anhefti Date: Tue, 18 Jun 2024 17:14:53 +0200 Subject: [PATCH] SEBSERV-417 add rollback of exam import on partial import --- .../servicelayer/lms/impl/FullLmsIntegrationServiceImpl.java | 1 - .../servicelayer/lms/impl/SEBRestrictionServiceImpl.java | 2 +- 2 files changed, 1 insertion(+), 2 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 6be32741..c0830352 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 @@ -315,7 +315,6 @@ public class FullLmsIntegrationServiceImpl implements FullLmsIntegrationService .getLmsSetupIdByConnectionId(lmsUUID) .flatMap(lmsAPITemplateCacheService::getLmsAPITemplate) .map(template -> getQuizData(template, courseId, quizId, examData)) - //.map(findQuizData(courseId, quizId)) .map(createExam(examTemplateId, quitPassword)) .map(exam -> applyExamData(exam, false)) .map(this::applyConnectionConfiguration); diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/SEBRestrictionServiceImpl.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/SEBRestrictionServiceImpl.java index 8bea0a64..7ffae6c1 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/SEBRestrictionServiceImpl.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/SEBRestrictionServiceImpl.java @@ -167,7 +167,7 @@ public class SEBRestrictionServiceImpl implements SEBRestrictionService { return this.applySEBClientRestriction(exam) .flatMap(e -> this.examDAO.setSEBRestriction(e.id, true)) .onError(t -> log.error("Failed to update SEB Client restriction for Exam: {}", exam, t)) - .getOr(exam); + .getOrThrow(); } @Override