Skip to content
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -463,13 +463,13 @@ AND TYPE(e) <> de.tum.cit.aet.artemis.quiz.domain.QuizExercise
* Fetches the number of student participations in the given exercise
*
* @param exerciseId the id of the exercise to get the amount for
* @return The number of participations as <code>Long</code>
* @return The number of student participations as <code>Long</code>
*/
@Query("""
SELECT COUNT(DISTINCT p.student.id)
FROM Exercise e
JOIN e.studentParticipations p
WHERE e.id = :exerciseId
WHERE e.id = :exerciseId AND e.course.studentGroupName MEMBER OF p.student.groups
""")
Long getStudentParticipationCountById(@Param("exerciseId") Long exerciseId);

Expand Down
Loading