SEBSERV-581 fixed (skip for none LMS Exams)
This commit is contained in:
parent
9e5a0085b3
commit
ed48fad27c
3 changed files with 3 additions and 3 deletions
|
@ -363,7 +363,7 @@ public final class Exam implements GrantEntity {
|
||||||
|
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public boolean isLmsAvailable() {
|
public boolean isLmsAvailable() {
|
||||||
return BooleanUtils.isTrue(this.lmsAvailable);
|
return BooleanUtils.isNotFalse(this.lmsAvailable);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getExternalId() {
|
public String getExternalId() {
|
||||||
|
|
|
@ -336,7 +336,7 @@ public class ExamList implements TemplateComposer {
|
||||||
final Exam exam,
|
final Exam exam,
|
||||||
final PageService pageService) {
|
final PageService pageService) {
|
||||||
|
|
||||||
if (BooleanUtils.isFalse(exam.isLmsAvailable())) {
|
if (exam.lmsSetupId != null && BooleanUtils.isFalse(exam.isLmsAvailable())) {
|
||||||
item.setData(RWT.CUSTOM_VARIANT, CustomVariant.DISABLED.key);
|
item.setData(RWT.CUSTOM_VARIANT, CustomVariant.DISABLED.key);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -146,7 +146,7 @@ class ExamUpdateHandler implements ExamUpdateTask {
|
||||||
.forEach(quizId -> {
|
.forEach(quizId -> {
|
||||||
try {
|
try {
|
||||||
final Exam exam = exams.get(quizId);
|
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);
|
this.examDAO.markLMSAvailability(quizId, false, updateId);
|
||||||
}
|
}
|
||||||
} catch (final Exception ee) {
|
} catch (final Exception ee) {
|
||||||
|
|
Loading…
Reference in a new issue