From 8484e2f6b57d0f461574ad68282ffbdffbfdf6d4 Mon Sep 17 00:00:00 2001 From: anhefti Date: Mon, 18 Dec 2023 10:44:07 +0100 Subject: [PATCH] SEBSERV-457 fixed exam consistency check to exclude SEB lock for Exam without LMS --- .../servicelayer/session/impl/ExamSessionServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/ExamSessionServiceImpl.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/ExamSessionServiceImpl.java index 4abf0951..b8898d5c 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/ExamSessionServiceImpl.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/ExamSessionServiceImpl.java @@ -157,7 +157,7 @@ public class ExamSessionServiceImpl implements ExamSessionService { .getOrThrow(); // check lms connection - if (!exam.isLmsAvailable()) { + if (exam.lmsSetupId != null && !exam.isLmsAvailable()) { result.add(ErrorMessage.EXAM_CONSISTENCY_VALIDATION_LMS_CONNECTION.of(exam.getModelId())); } @@ -174,7 +174,7 @@ public class ExamSessionServiceImpl implements ExamSessionService { return null; }); - if (!this.sebRestrictionService.checkSebRestrictionSet(exam)) { + if (exam.lmsSetupId != null && !this.sebRestrictionService.checkSebRestrictionSet(exam)) { result.add( ErrorMessage.EXAM_CONSISTENCY_VALIDATION_SEB_RESTRICTION .of(exam.getModelId()));