minor fixes
This commit is contained in:
parent
22bbee1117
commit
9627940fbb
2 changed files with 7 additions and 7 deletions
|
@ -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))
|
||||
|
|
|
@ -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()) {
|
||||
|
|
Loading…
Reference in a new issue