Merge remote-tracking branch 'origin/dev-1.1-patch-1' into development
Conflicts: src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/ExamJITSIProctoringService.java
This commit is contained in:
commit
39e8846f64
2 changed files with 6 additions and 5 deletions
|
@ -151,8 +151,8 @@ public class ExamSessionCacheService {
|
||||||
unless = "#result == null")
|
unless = "#result == null")
|
||||||
public ClientConnectionDataInternal getClientConnection(final String connectionToken) {
|
public ClientConnectionDataInternal getClientConnection(final String connectionToken) {
|
||||||
|
|
||||||
if (log.isDebugEnabled()) {
|
if (log.isTraceEnabled()) {
|
||||||
log.debug("Verify ClientConnection for running exam for caching by connectionToken: {}", connectionToken);
|
log.trace("Verify ClientConnection for running exam for caching by connectionToken: {}", connectionToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
final ClientConnection clientConnection = getClientConnectionByToken(connectionToken);
|
final ClientConnection clientConnection = getClientConnectionByToken(connectionToken);
|
||||||
|
|
|
@ -207,7 +207,10 @@ public class ExamSessionServiceImpl implements ExamSessionService {
|
||||||
log.trace("Running exam request for exam {}", examId);
|
log.trace("Running exam request for exam {}", examId);
|
||||||
}
|
}
|
||||||
|
|
||||||
updateExamCache(examId);
|
if (this.distributedSetup) {
|
||||||
|
updateExamCache(examId);
|
||||||
|
}
|
||||||
|
|
||||||
final Exam exam = this.examSessionCacheService.getRunningExam(examId);
|
final Exam exam = this.examSessionCacheService.getRunningExam(examId);
|
||||||
|
|
||||||
if (this.examSessionCacheService.isRunning(exam)) {
|
if (this.examSessionCacheService.isRunning(exam)) {
|
||||||
|
@ -230,10 +233,8 @@ public class ExamSessionServiceImpl implements ExamSessionService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Result<Collection<Exam>> getRunningExamsForInstitution(final Long institutionId) {
|
public Result<Collection<Exam>> getRunningExamsForInstitution(final Long institutionId) {
|
||||||
// NOTE: we evict the exam from the cache (if present) to ensure user is seeing always the current state of the Exam
|
|
||||||
return this.examDAO.allIdsOfInstitution(institutionId)
|
return this.examDAO.allIdsOfInstitution(institutionId)
|
||||||
.map(col -> col.stream()
|
.map(col -> col.stream()
|
||||||
.map(this.examSessionCacheService::evict)
|
|
||||||
.map(this::getRunningExam)
|
.map(this::getRunningExam)
|
||||||
.filter(Result::hasValue)
|
.filter(Result::hasValue)
|
||||||
.map(Result::get)
|
.map(Result::get)
|
||||||
|
|
Loading…
Reference in a new issue