-
Notifications
You must be signed in to change notification settings - Fork 344
Development
: Add server functionality for simple exam seat distribution
#11378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
SamuelRoettgermann
wants to merge
184
commits into
develop
Choose a base branch
from
feature/exam-mode/seating-distribution-algorithm
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+699
−120
Open
Changes from all commits
Commits
Show all changes
184 commits
Select commit
Hold shift + click to select a range
eb54ed9
Fixed minor spelling mistake in comment
SamuelRoettgermann e3437d6
renamed warning and tooltip
SamuelRoettgermann d60eb17
changed the minimum valid value from 0 to 1
SamuelRoettgermann da3b4c8
deprecated an outdated validator
SamuelRoettgermann 6732bf0
added tooltip for the number of exercises in exam
SamuelRoettgermann 0bfaf7e
improved the deprecation message
SamuelRoettgermann 8f1a3a6
add test for the min adjustment
SamuelRoettgermann f2efca0
initial setup
SamuelRoettgermann f021a56
URL is openable and calls correct REST endpoint, however not yet navi…
SamuelRoettgermann 5a1cafb
added exam room button to admin dropdown
SamuelRoettgermann dca8ba1
created domain objects and liquibase changelog
SamuelRoettgermann a86f864
implemented the domain objects, defined the DB changes, and added two…
SamuelRoettgermann d8a6a90
added documentation for the entities
SamuelRoettgermann fa8356d
init setup of the exam room repository
SamuelRoettgermann d6a952c
added JSON include only non-empty for entities
SamuelRoettgermann 7076ed7
changed coordinate types to float and added exam-room-id column to th…
SamuelRoettgermann 2ec994b
follow up update on the liquibase column addition
SamuelRoettgermann da24105
added 2 more columns to ExamRoom to be able to store all possible nam…
SamuelRoettgermann b28dc45
added a few fields to the tables, and unfinished version of room parsing
SamuelRoettgermann cda2bb1
JSON serialization issue fixed -> Uploading rooms works, however room…
SamuelRoettgermann fdf6dc4
several logger limitations to make it more readable
SamuelRoettgermann f4988ca
fixed serialization issues, was more verbose in Java code
SamuelRoettgermann b64f67b
room parsing with capacity per layout instead of per room works, stil…
SamuelRoettgermann 5ef3e88
liquibase changes according to the domain changes
SamuelRoettgermann 7ec543c
parsing works, old & unused entries still need to be deleted, backend…
SamuelRoettgermann d067a1d
display the update information returned from the backend
SamuelRoettgermann efcecd3
added a new table exam_room_assignment, added planned seat entity to …
SamuelRoettgermann 7491679
fixed auto-generated queries
SamuelRoettgermann a05b723
added a query to find all outdated exam rooms
SamuelRoettgermann 915ae79
added backend code to return an exam room admin overview, aswell as f…
SamuelRoettgermann 124a2ab
more of less logging
SamuelRoettgermann 76c20f2
added exam room overview information and deletion button to admin ove…
SamuelRoettgermann 3edb5bc
made the ExamSeat a JSON field in ExamRoom, rewrote a bunch of stuff …
SamuelRoettgermann 720441f
converted ExamSeat from an entity to a DTO, added backend functionali…
SamuelRoettgermann 03de792
removed examSeatEntity and examRoomEntity from ExamUser cause it's ju…
SamuelRoettgermann 0d7eda1
fixed bugs arised from removing the examRoom reference from ExamUser,…
SamuelRoettgermann 44f0e2e
Merge branch 'develop' into feature/exam-mode/add-room-data-insertion…
SamuelRoettgermann 2c8a0a3
added capacity calculations, various cleanups, mental breakdown over …
SamuelRoettgermann 6ec0c1f
various beautifications, now uses actual jhi-translate strings, still…
SamuelRoettgermann 656116b
removed unrequired routing file
SamuelRoettgermann dc00bd4
added translations for English and German
SamuelRoettgermann a363397
added sorting functionality, moved functionality from template to com…
SamuelRoettgermann 889a328
irrelevant
SamuelRoettgermann b6c9ab7
Merge branch 'develop' into feature/exam-mode/add-room-data-insertion…
SamuelRoettgermann 8ed8f44
updated Liquibase changes to new date
SamuelRoettgermann 7003ad3
removed custom Sass file
SamuelRoettgermann e2f3476
removed outdated client tests
SamuelRoettgermann 3736c70
massively reduced the number of WriteableSignals, simplified logic to…
SamuelRoettgermann cf22303
added missing translations
SamuelRoettgermann 85e2ed2
documented the backend code
SamuelRoettgermann 44f715e
fixed client errors
SamuelRoettgermann 9fa408b
Merge branch 'develop' into feature/exam-mode/add-room-data-insertion…
SamuelRoettgermann 9392878
improved type-hint for string
SamuelRoettgermann a9c207a
added JSDoc to the TS code
SamuelRoettgermann 16c4886
moved logic out of the template
SamuelRoettgermann 28cb949
massively reduced DB calls
SamuelRoettgermann 466afc6
moved a DTO-related enum from domain into DTO folder
SamuelRoettgermann a27a5e2
added a bit more documentation to the liquibase changelog
SamuelRoettgermann 4cb0821
delete broken testing file
SamuelRoettgermann 1d80bfc
clarified a comment
SamuelRoettgermann cab4585
fixed a wrong JavaDoc
SamuelRoettgermann 8b8bf1b
fixed a display issue
SamuelRoettgermann 25c587e
implemented all review suggestions from Lukas and CodeRabbit, and all…
SamuelRoettgermann 7b2e245
prevent parallel uploads
SamuelRoettgermann 5a40386
implemented Lukas suggestion to use Jackson for help with parsing the…
SamuelRoettgermann 30ac592
reduced number of DB calls, added filename to the file-upload-button,…
SamuelRoettgermann ff90af4
fixed more coderabbit suggestions
SamuelRoettgermann c5cd592
fixed an error from a newly added test, that my code violated
SamuelRoettgermann d510ccc
fixed 2 more points of Lukas
SamuelRoettgermann 0fd9652
one more coderabbit suggestion for protecting against foreign user input
SamuelRoettgermann 9731204
fixed another issue because I used the wrong @NotNull annotation
SamuelRoettgermann a229956
changed translation for the safe delete button
SamuelRoettgermann 0ffdb2a
made function names more intuitive, improved & fixed some JavaDoc
SamuelRoettgermann 786a311
adapted recommended liquibase changes
SamuelRoettgermann b28ecd0
removed accidental changes, presumably from a develop merge
SamuelRoettgermann 1f5299d
removed Getters and Setters markers
SamuelRoettgermann 5c54d33
removed dangling JavaDoc comments, renamed fields to be more descript…
SamuelRoettgermann b4327fc
removed redundant code
SamuelRoettgermann 5a1e408
removed redundant data sent via DTO, moved the calculations to the cl…
SamuelRoettgermann 70969d1
made the delete not delete as a batch anymore to prevent potential da…
SamuelRoettgermann 32ffad1
renamed idx to index
SamuelRoettgermann bb5f9d3
parsing seats and layouts now more often raise an exception rather th…
SamuelRoettgermann e2cfd5d
moved HTTP calls in a .service.ts file
SamuelRoettgermann 54653f8
added NotNull to all DTOs; made capacity non-nullable
SamuelRoettgermann 135c3f8
made ExamSeatDTOs coordinates double instead of float
SamuelRoettgermann f20e8e3
made examRoom load lazy in LayoutStrategy
SamuelRoettgermann d6a6e15
added Bean JSON validation to LayoutStrategy#parametersJson
SamuelRoettgermann 2d30981
removed impossible to hit exception from catch clause
SamuelRoettgermann 08f459b
pedantic import error
SamuelRoettgermann 709b274
unified some duplicated duration formatting code
SamuelRoettgermann 11e289a
removed the conirm/alert calls and instead use DeleteDialogService fo…
SamuelRoettgermann 121fbee
code cleanup, using regular artemis alerts now instead of custom erro…
SamuelRoettgermann 436474c
remove code nesting by using guard clauses
SamuelRoettgermann a819759
added text to empty error message for getting an error while getting …
SamuelRoettgermann 3233321
now TS also uses the correct translation key
SamuelRoettgermann b821ba6
Merge branch 'develop' into feature/exam-mode/add-room-data-insertion…
SamuelRoettgermann f8c24a9
some CodeRabbit nitpicks
SamuelRoettgermann f790aae
partial recovery of test code, lost about 3 days worth of work due to…
SamuelRoettgermann 3b9d5fd
Merge remote-tracking branch 'refs/remotes/origin/feature/exam-mode/a…
SamuelRoettgermann ae67da4
re-finished the service tests
SamuelRoettgermann 3cf548f
integration tests
SamuelRoettgermann ff44bd5
fixed integration tests
SamuelRoettgermann 1fb6e40
added a few more integration tests
SamuelRoettgermann 6a402ca
finished backend tests, except for minor bugs
SamuelRoettgermann 30d24c2
fixed all integration tests
SamuelRoettgermann 6355bac
fixed code structural tests, code rabbit suggestion for using Void.cl…
SamuelRoettgermann 49dbbf1
resolved merge conflict
SamuelRoettgermann efed2bc
added frontend tests
SamuelRoettgermann de448f4
added more frontend tests to increase coverage
SamuelRoettgermann 681e033
fixed compilation failures due to new checkstyles
SamuelRoettgermann b9c7729
fixed client compilation issues, hopefully I didn
SamuelRoettgermann 8fe63e7
of course I missed one case
SamuelRoettgermann c77c5b7
bunch of CodeRabbit suggestions
SamuelRoettgermann 065f8ed
added file too big error in backend
SamuelRoettgermann 1b3e19f
fixed chronological order in master.xml
SamuelRoettgermann d09220b
fixed typo in master.xml
SamuelRoettgermann 6f98903
applied CodeRabbit suggestion
SamuelRoettgermann 85a3465
applied CodeRabbit nitpick comment to get rid off an injected, but ne…
SamuelRoettgermann 172d3d3
talked with CodeRabbit and now use a more specific, albeit sometimes …
SamuelRoettgermann 9c3a39c
applied more CodeRabbit suggestions
SamuelRoettgermann b5caf15
applied some CodeRabbit nitpick comments
SamuelRoettgermann 142cf31
more CodeRabbit fixes
SamuelRoettgermann 4cc239a
fixed wrong reading of seat condition flags, and IO exception
SamuelRoettgermann 8d004b1
first round of Tobias change requests
SamuelRoettgermann b0d15d0
rest of Tobi's change requests + CodeRabbit change requests
SamuelRoettgermann 571cd49
fixed a few last compilation errors and finally found and fixed a nas…
SamuelRoettgermann 1ac17d7
CodeRabbit suggestions
SamuelRoettgermann 67a160a
Merge branch 'develop' into feature/exam-mode/add-room-data-insertion…
SamuelRoettgermann 327a7a3
improved comment clarity even more
SamuelRoettgermann 87aa963
improved documentation and usability
SamuelRoettgermann 4baac6e
added tests for new pipe to meet coverage threshold
SamuelRoettgermann 052b774
removed a test that worked locally but failed for type safety things …
SamuelRoettgermann 32c2ef3
initial commit
SamuelRoettgermann 771647f
applied Tobi's last fixes
SamuelRoettgermann 0fa2580
still missing 2 german and all english translations, added transient …
SamuelRoettgermann 28b0627
removed some unnecessary String.valueOf wrappers
SamuelRoettgermann fd6b28a
removed formatting disabled blocks
SamuelRoettgermann 24ee19f
removed all <p></p> instances for spacing from the template
SamuelRoettgermann 2e0aac8
code rabbit language fix, and also removed unused translation strings
SamuelRoettgermann 1459597
fixed a bug Marlon found on Chrome and Safari; fixed a bug with displ…
SamuelRoettgermann 2c51429
added padding to the upload and deletion card titles
SamuelRoettgermann 404b792
Merge branch 'feature/exam-mode/add-room-data-insertion-admin-panel' …
SamuelRoettgermann aa0f040
added REST endpoint for simple distributions, only to the default dis…
SamuelRoettgermann be6f573
Merge branch 'develop' into feature/exam-mode/seating-distribution-al…
SamuelRoettgermann 6d2dbd9
minor code beautification
SamuelRoettgermann 9de7f05
added fixed selection support; made the fixed selection fail-early i.…
SamuelRoettgermann ff5c4b9
re-added accidently deleted repository function
SamuelRoettgermann b84ba36
improved error message a bit; still need to add translation keys
SamuelRoettgermann 8d9ac66
added the room ID to the admin overview page
SamuelRoettgermann 76eb651
simplified & optimized a query
SamuelRoettgermann 8c10817
fixed bug showing all exam rooms rather than just the newest one
SamuelRoettgermann 916933c
minor formatting fix
SamuelRoettgermann 0bc9f62
added i18n translations, and removed some unnecessary logging
SamuelRoettgermann 180a86b
reset the planned room and seat fields on exam room deletion
SamuelRoettgermann 3fb7858
code cleanup, and fixed a bug where it deleted old exam room assignme…
SamuelRoettgermann 6175031
removed transient fields that were not yet used, but a good chunk of …
SamuelRoettgermann 8afac7d
minor code cleanup and performance optimization; also made the JavaDo…
SamuelRoettgermann 362b56e
added default capacity display to the admin overview
SamuelRoettgermann 11236a7
fixed tests related to the realistic exam room zip file scenario
SamuelRoettgermann 0e2021d
fixed some examRepositoryArchitectureTests
SamuelRoettgermann d884e13
this PR fixes the examRepositoryArchitectureTest; the previous commit…
SamuelRoettgermann 484ad2c
a lot of code rabbit suggestions and nitpicks
SamuelRoettgermann 69bf6f2
one additional coderabbit suggestion to make a query more in-line wit…
SamuelRoettgermann 342b6a0
batch save instead of individual saves
SamuelRoettgermann edabd3e
more CodeRabbit nitpicks
SamuelRoettgermann 2dee634
Tobi's fixes
SamuelRoettgermann 5efcd60
CodeRabbit query re-reversal
SamuelRoettgermann c7ff242
last of Tobi's suggestion to move code into new service & resource
SamuelRoettgermann 9e36dfc
more CodeRabbit suggestions
SamuelRoettgermann 4704f32
Merge branch 'develop' into feature/exam-mode/seating-distribution-al…
SamuelRoettgermann c01bc32
fixed query for Postgres (json type doesnt have a comparison and DIST…
SamuelRoettgermann c593a6b
Review suggestions
SamuelRoettgermann 3ce8a0c
one code rabbit suggestion and minor spelling changes
SamuelRoettgermann e2067cc
code rabbit suggestion for a key-bug fiX
SamuelRoettgermann c8a4988
Merge branch 'develop' into feature/exam-mode/seating-distribution-al…
SamuelRoettgermann 250e897
fixed a JavaDoc
SamuelRoettgermann 79e252b
applied Tobi's change
SamuelRoettgermann 203fa00
Merge remote-tracking branch 'refs/remotes/origin/feature/exam-mode/s…
SamuelRoettgermann 23942e9
removed the 'delete all exam rooms including the newest version' feature
SamuelRoettgermann f71e17d
removed global reset of exam users
SamuelRoettgermann 21b93a6
Merge branch 'chore/exam-mode/remove-delete-all-rooms-functionality' …
SamuelRoettgermann 1672f55
Merge branch 'develop' into feature/exam-mode/seating-distribution-al…
SamuelRoettgermann 1a18996
adapted programming branch coverage by -0.04
SamuelRoettgermann 3da297d
Merge branch 'develop' into feature/exam-mode/seating-distribution-al…
SamuelRoettgermann File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/main/java/de/tum/cit/aet/artemis/exam/repository/ExamRoomExamAssignmentRepository.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package de.tum.cit.aet.artemis.exam.repository; | ||
|
||
import org.springframework.context.annotation.Conditional; | ||
import org.springframework.context.annotation.Lazy; | ||
import org.springframework.data.jpa.repository.Modifying; | ||
import org.springframework.stereotype.Repository; | ||
import org.springframework.transaction.annotation.Transactional; | ||
|
||
import de.tum.cit.aet.artemis.core.repository.base.ArtemisJpaRepository; | ||
import de.tum.cit.aet.artemis.exam.config.ExamEnabled; | ||
import de.tum.cit.aet.artemis.exam.domain.room.ExamRoomExamAssignment; | ||
|
||
/** | ||
* Spring Data JPA repository for the {@link de.tum.cit.aet.artemis.exam.domain.room.ExamRoomExamAssignment} entity. | ||
*/ | ||
@Conditional(ExamEnabled.class) | ||
@Lazy | ||
@Repository | ||
public interface ExamRoomExamAssignmentRepository extends ArtemisJpaRepository<ExamRoomExamAssignment, Long> { | ||
|
||
@Transactional | ||
@Modifying | ||
void deleteAllByExamId(long examId); | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
121 changes: 121 additions & 0 deletions
121
src/main/java/de/tum/cit/aet/artemis/exam/service/ExamRoomDistributionService.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
package de.tum.cit.aet.artemis.exam.service; | ||
|
||
import java.util.ArrayList; | ||
import java.util.HashMap; | ||
import java.util.Iterator; | ||
import java.util.List; | ||
import java.util.Map; | ||
import java.util.Set; | ||
|
||
import jakarta.validation.constraints.NotEmpty; | ||
|
||
import org.springframework.context.annotation.Conditional; | ||
import org.springframework.context.annotation.Lazy; | ||
import org.springframework.stereotype.Service; | ||
|
||
SamuelRoettgermann marked this conversation as resolved.
Show resolved
Hide resolved
|
||
import de.tum.cit.aet.artemis.core.exception.BadRequestAlertException; | ||
import de.tum.cit.aet.artemis.exam.config.ExamEnabled; | ||
import de.tum.cit.aet.artemis.exam.domain.Exam; | ||
import de.tum.cit.aet.artemis.exam.domain.ExamUser; | ||
import de.tum.cit.aet.artemis.exam.domain.room.ExamRoom; | ||
import de.tum.cit.aet.artemis.exam.domain.room.ExamRoomExamAssignment; | ||
import de.tum.cit.aet.artemis.exam.dto.room.ExamSeatDTO; | ||
import de.tum.cit.aet.artemis.exam.repository.ExamRepository; | ||
import de.tum.cit.aet.artemis.exam.repository.ExamRoomExamAssignmentRepository; | ||
import de.tum.cit.aet.artemis.exam.repository.ExamRoomRepository; | ||
import de.tum.cit.aet.artemis.exam.repository.ExamUserRepository; | ||
|
||
/** | ||
* Service Implementation for managing distributions of exam users to exam rooms in an exam. | ||
*/ | ||
@Conditional(ExamEnabled.class) | ||
@Lazy | ||
@Service | ||
public class ExamRoomDistributionService { | ||
|
||
private static final String ENTITY_NAME = "examRoomDistributionService"; | ||
|
||
private final ExamRepository examRepository; | ||
|
||
private final ExamRoomRepository examRoomRepository; | ||
|
||
private final ExamRoomService examRoomService; | ||
|
||
private final ExamRoomExamAssignmentRepository examRoomExamAssignmentRepository; | ||
|
||
private final ExamUserRepository examUserRepository; | ||
|
||
public ExamRoomDistributionService(ExamRepository examRepository, ExamRoomRepository examRoomRepository, ExamRoomService examRoomService, | ||
ExamRoomExamAssignmentRepository examRoomExamAssignmentRepository, ExamUserRepository examUserRepository) { | ||
this.examRepository = examRepository; | ||
this.examRoomRepository = examRoomRepository; | ||
this.examRoomService = examRoomService; | ||
this.examRoomExamAssignmentRepository = examRoomExamAssignmentRepository; | ||
this.examUserRepository = examUserRepository; | ||
} | ||
|
||
/** | ||
* Distribute all students who are registered for a given exam across a selection of rooms. | ||
* Existing planned seats and room assignments are replaced. | ||
* | ||
* @param examId The exam | ||
* @param examRoomIds The ids of the rooms to distribute to | ||
* @implNote Currently only the "default" layout strategy is used. | ||
*/ | ||
public void distributeRegisteredStudents(long examId, @NotEmpty Set<Long> examRoomIds) { | ||
final Exam exam = examRepository.findByIdWithExamUsersElseThrow(examId); | ||
final Set<ExamRoom> examRoomsForExam = examRoomRepository.findAllWithEagerLayoutStrategiesByIdIn(examRoomIds); | ||
|
||
final int numberOfUsableSeats = examRoomsForExam.stream().mapToInt(examRoom -> examRoomService.getDefaultLayoutStrategyOrElseThrow(examRoom).getCapacity()).sum(); | ||
final int numberOfExamUsers = exam.getExamUsers().size(); | ||
|
||
if (numberOfUsableSeats < numberOfExamUsers) { | ||
throw new BadRequestAlertException("Not enough seats available in the selected rooms", ENTITY_NAME, "notEnoughExamSeats", | ||
Map.of("numberOfUsableSeats", numberOfUsableSeats, "numberOfExamUsers", numberOfExamUsers)); | ||
} | ||
|
||
examRoomExamAssignmentRepository.deleteAllByExamId(examId); | ||
List<ExamRoomExamAssignment> examRoomExamAssignments = new ArrayList<>(); | ||
for (ExamRoom examRoom : examRoomsForExam) { | ||
var examRoomExamAssignment = new ExamRoomExamAssignment(); | ||
examRoomExamAssignment.setExamRoom(examRoom); | ||
examRoomExamAssignment.setExam(exam); | ||
examRoomExamAssignments.add(examRoomExamAssignment); | ||
} | ||
examRoomExamAssignmentRepository.saveAll(examRoomExamAssignments); | ||
|
||
distributeExamUsersToUsableSeatsInRooms(exam, examRoomsForExam); | ||
} | ||
|
||
private void distributeExamUsersToUsableSeatsInRooms(Exam exam, Set<ExamRoom> examRoomsForExam) { | ||
Map<String, List<ExamSeatDTO>> roomNumberToUsableSeatsDefaultLayout = new HashMap<>(); | ||
for (ExamRoom examRoom : examRoomsForExam) { | ||
roomNumberToUsableSeatsDefaultLayout.put(examRoom.getRoomNumber(), examRoomService.getDefaultUsableSeats(examRoom)); | ||
} | ||
|
||
setPlannedRoomAndPlannedSeatForExamUsersRandomly(exam, roomNumberToUsableSeatsDefaultLayout); | ||
|
||
examUserRepository.saveAll(exam.getExamUsers()); | ||
examRepository.save(exam); | ||
} | ||
|
||
private void setPlannedRoomAndPlannedSeatForExamUsersRandomly(Exam exam, Map<String, List<ExamSeatDTO>> roomNumberToUsableSeats) { | ||
Iterator<ExamUser> examUsersIterator = exam.getExamUsers().iterator(); | ||
|
||
for (var roomNumberToUsableSeatsEntry : roomNumberToUsableSeats.entrySet()) { | ||
final String roomNumber = roomNumberToUsableSeatsEntry.getKey(); | ||
final List<ExamSeatDTO> usableSeatsForThisRoom = roomNumberToUsableSeatsEntry.getValue(); | ||
|
||
for (ExamSeatDTO seat : usableSeatsForThisRoom) { | ||
if (!examUsersIterator.hasNext()) { | ||
return; | ||
} | ||
|
||
ExamUser nextExamUser = examUsersIterator.next(); | ||
nextExamUser.setPlannedRoom(roomNumber); | ||
nextExamUser.setPlannedSeat(seat.name()); | ||
exam.addExamUser(nextExamUser); | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.