From 9627940fbb87724cbf7b3207eb96e689e6110bfe Mon Sep 17 00:00:00 2001 From: anhefti Date: Wed, 1 Jun 2022 12:57:39 +0200 Subject: [PATCH] minor fixes --- .../ethz/seb/sebserver/gui/service/ResourceService.java | 6 ++++-- .../servicelayer/session/impl/ExamSessionServiceImpl.java | 8 +++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/ResourceService.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/ResourceService.java index 0ea7b952..c12bfc32 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/ResourceService.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/ResourceService.java @@ -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)) 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 1c063ccf..41820e4b 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 @@ -125,11 +125,9 @@ public class ExamSessionServiceImpl implements ExamSessionService { return Result.tryCatch(() -> { final Collection 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()) {