Skip to content

Commit

Permalink
CSCEXAM-1154 Show examination event enrolments even if event started
Browse files Browse the repository at this point in the history
  • Loading branch information
Matti Lupari committed Jan 9, 2024
1 parent e31b9f2 commit d3442b3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions app/repository/EnrolmentRepository.java
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,13 @@ private List<ExamEnrolment> doGetStudentEnrolments(User user) {
.endJunction()
.findList()
.stream()
.filter(ee ->
ee.getExaminationEventConfiguration() == null ||
ee.getExaminationEventConfiguration().getExaminationEvent().getStart().isAfter((DateTime.now()))
)
.filter(ee -> {
if (ee.getExaminationEventConfiguration() == null) {
return true;
}
var start = ee.getExaminationEventConfiguration().getExaminationEvent().getStart();
return start.plusMinutes(ee.getExam().getDuration()).isAfter(now);
})
.toList();
enrolments.forEach(ee -> {
Exam exam = ee.getExam();
Expand Down
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
resolvers += "Typesafe repository" at "https://repo.typesafe.com/typesafe/releases/"

addSbtPlugin("org.playframework" % "sbt-plugin" % "3.0.0")
addSbtPlugin("org.playframework" % "sbt-plugin" % "3.0.1")

addSbtPlugin("org.playframework" % "sbt-play-ebean" % "8.0.0")

Expand Down

0 comments on commit d3442b3

Please sign in to comment.