minor fixes

This commit is contained in:
anhefti 2022-06-01 12:57:39 +02:00
parent 22bbee1117
commit 9627940fbb
2 changed files with 7 additions and 7 deletions

View file

@ -669,8 +669,10 @@ public class ResourceService {
.call()
.getOr(Collections.emptyList())
.stream()
.filter(exam -> exam != null
&& (exam.getStatus() == ExamStatus.RUNNING || exam.getStatus() == ExamStatus.FINISHED))
.filter(exam -> exam != null &&
(exam.getStatus() == ExamStatus.RUNNING ||
exam.getStatus() == ExamStatus.FINISHED ||
exam.getStatus() == ExamStatus.ARCHIVED))
.map(exam -> new Tuple<>(
exam.getModelId(),
StringUtils.isBlank(exam.name) ? exam.externalId : exam.name))

View file

@ -125,11 +125,9 @@ public class ExamSessionServiceImpl implements ExamSessionService {
return Result.tryCatch(() -> {
final Collection<APIMessage> result = new ArrayList<>();
final Exam exam = (this.isExamRunning(examId))
? this.examSessionCacheService.getRunningExam(examId)
: this.examDAO
.byPK(examId)
.getOrThrow();
final Exam exam = this.examDAO
.byPK(examId)
.getOrThrow();
// check lms connection
if (!exam.isLmsAvailable()) {