SEBSERV-581 fixed (skip for none LMS Exams)

This commit is contained in:
anhefti 2024-08-21 12:07:31 +02:00
parent 9e5a0085b3
commit ed48fad27c
3 changed files with 3 additions and 3 deletions

View file

@ -363,7 +363,7 @@ public final class Exam implements GrantEntity {
@JsonIgnore
public boolean isLmsAvailable() {
return BooleanUtils.isTrue(this.lmsAvailable);
return BooleanUtils.isNotFalse(this.lmsAvailable);
}
public String getExternalId() {

View file

@ -336,7 +336,7 @@ public class ExamList implements TemplateComposer {
final Exam exam,
final PageService pageService) {
if (BooleanUtils.isFalse(exam.isLmsAvailable())) {
if (exam.lmsSetupId != null && BooleanUtils.isFalse(exam.isLmsAvailable())) {
item.setData(RWT.CUSTOM_VARIANT, CustomVariant.DISABLED.key);
return;
}

View file

@ -146,7 +146,7 @@ class ExamUpdateHandler implements ExamUpdateTask {
.forEach(quizId -> {
try {
final Exam exam = exams.get(quizId);
if (exam.lmsAvailable == null || exam.isLmsAvailable()) {
if (exam.lmsSetupId != null && (exam.lmsAvailable == null || exam.isLmsAvailable())) {
this.examDAO.markLMSAvailability(quizId, false, updateId);
}
} catch (final Exception ee) {