Skip to content

Commit

Permalink
Add JavaDoc
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannesStoehr committed Jul 13, 2024
1 parent 198445e commit 5ad41dd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,12 @@ default CourseCompetency findByIdWithExercisesAndLectureUnitsBidirectionalElseTh
return getValueElseThrow(findByIdWithExercisesAndLectureUnitsBidirectional(competencyId), competencyId);
}

/**
* Finds the set of ids of course competencies that are linked to a given learning object
*
* @param learningObject the learning object to find the course competencies for
* @return the set of ids of course competencies linked to the learning object
*/
default Set<Long> findAllIdsByLearningObject(LearningObject learningObject) {
return switch (learningObject) {
case LectureUnit lectureUnit -> findAllIdsByLectureUnit(lectureUnit);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,12 @@ public double getAverageOfAverageScores(Set<Exercise> exercises) {
.orElse(0.0);
}

/**
* Get all users that participated in the given exercise.
*
* @param exercise the exercise for which to get all users that participated
* @return set of users that participated in the exercise
*/
public Set<User> getAllParticipatedUsersInExercise(Exercise exercise) {
if (exercise.isTeamMode()) {
return teamScoreRepository.findAllUsersWithScoresByExercise(exercise);
Expand Down

0 comments on commit 5ad41dd

Please sign in to comment.