SEBSERV-457 fixed exam consistency check to exclude SEB lock for Exam without LMS

This commit is contained in:
anhefti 2023-12-18 10:44:07 +01:00
parent b4b5b6e410
commit 8484e2f6b5

View file

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