@@ -63,10 +63,9 @@ private Optional<Exam> doCreateExam(Exam prototype, User user, ExamEnrolment enr
6363 boolean isCollaborative = enrolment .getCollaborativeExam () != null ;
6464 Reservation reservation = enrolment .getReservation ();
6565 // TODO: support for optional sections in BYOD exams
66- Set <Long > ids =
67- reservation == null
68- ? Collections .emptySet ()
69- : enrolment .getOptionalSections ().stream ().map (ExamSection ::getId ).collect (Collectors .toSet ());
66+ Set <Long > ids = reservation == null
67+ ? Collections .emptySet ()
68+ : enrolment .getOptionalSections ().stream ().map (ExamSection ::getId ).collect (Collectors .toSet ());
7069 ExamCopyContext context = isCollaborative
7170 ? ExamCopyContext .forCollaborativeExam (user ).withSelectedSections (ids ).build ()
7271 : ExamCopyContext .forStudentExam (user ).withSelectedSections (ids ).build ();
@@ -128,13 +127,12 @@ public CompletionStage<Exam> createFinalExam(Exam clone, User user, ExamEnrolmen
128127 }
129128 DateTime now = DateTime .now ();
130129 if (enrolment .getExaminationEventConfiguration () == null ) {
131- now =
132- reservation == null
133- ? dateTimeHandler .adjustDST (DateTime .now ())
134- : dateTimeHandler .adjustDST (
135- DateTime .now (),
136- enrolment .getReservation ().getMachine ().getRoom ()
137- );
130+ now = reservation == null
131+ ? dateTimeHandler .adjustDST (DateTime .now ())
132+ : dateTimeHandler .adjustDST (
133+ DateTime .now (),
134+ enrolment .getReservation ().getMachine ().getRoom ()
135+ );
138136 }
139137 examParticipation .setStarted (now );
140138 db .save (examParticipation );
@@ -210,8 +208,9 @@ private Query<Exam> createQuery(PathProperties pp) {
210208 }
211209
212210 private boolean isInEffect (ExamEnrolment ee ) {
213- DateTime now =
214- ee .getExaminationEventConfiguration () == null ? dateTimeHandler .adjustDST (DateTime .now ()) : DateTime .now ();
211+ DateTime now = ee .getExaminationEventConfiguration () == null
212+ ? dateTimeHandler .adjustDST (DateTime .now ())
213+ : DateTime .now ();
215214 if (ee .getReservation () != null ) {
216215 return (ee .getReservation ().getStartAt ().isBefore (now ) && ee .getReservation ().getEndAt ().isAfter (now ));
217216 } else if (ee .getExaminationEventConfiguration () != null ) {
0 commit comments