Skip to content

Commit

Permalink
Merge branch 'dev' into CSCEXAM-1237
Browse files Browse the repository at this point in the history
  • Loading branch information
lupari authored Jun 25, 2024
2 parents 4697361 + 37a1163 commit 52de744
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions app/system/actors/ReservationPollerActor.scala
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ class ReservationPollerActor @Inject (
with DbApiHelper:

private def isPast(ee: ExamEnrolment): Boolean =
val now = dateTimeHandler.adjustDST(DateTime.now)
if (ee.getExaminationEventConfiguration == null && ee.getReservation != null)
return ee.getReservation.getEndAt.isBefore(now)
val now = dateTimeHandler.adjustDST(DateTime.now)
ee.getReservation.getEndAt.isBefore(now)
else if (ee.getExaminationEventConfiguration != null) {
val duration = ee.getExam.getDuration
val start = ee.getExaminationEventConfiguration.getExaminationEvent.getStart
return start.plusMinutes(duration).isBefore(now)
start.plusMinutes(duration).isBeforeNow
}
false

Expand Down Expand Up @@ -79,6 +79,7 @@ class ReservationPollerActor @Inject (
.eq("sentAsNoShow", false)
.lt("endAt", dateTimeHandler.adjustDST(DateTime.now))
.list

if enrolments.isEmpty && reservations.isEmpty then logger.debug("None found")
else noShowHandler.handleNoShows(enrolments.asJava, reservations.asJava)
logger.debug("<- done")
Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/enrolment/enrolment.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ export class EnrolmentService {
this.http.get<CollaborativeParticipation[]>('/app/iop/student/finishedExams');

searchExams$ = (searchTerm: string): Observable<CollaborativeExam[]> => {
const paramStr = searchTerm ? `?filter=${encodeURIComponent(searchTerm)}` : '';
const paramStr = searchTerm ? `?filter=${encodeURIComponent(searchTerm)}` : '';
const path = `/app/iop/enrolment${paramStr}`;
return this.http.get<CollaborativeExam[]>(path);
};
Expand Down

0 comments on commit 52de744

Please sign in to comment.