Open niels-beier opened 2 years ago
Can confirm the issue! Unfortunately due to a problem with my development setup I currently am not able to fix the issue. If you want to, you can have a look at the code:
I think this happens because the exercise_points
are only filtered by the id of the user. Since all exercises of the exam should have entries for the given user and its ID all exercises are filtered out.
I think a fix would be to add another filter like this:
exer_students = exercise.exam.exercise_points.filter(models.ExerciseStudent.student_id == user.id).filter(models.Exam.id == exercise.id)
This should filter the exercise points of the given user by the ID of the given exercise.
If you request an exercise via the API (https://muesli.mathi.uni-heidelberg.de/api/v1/exercises/"exercise-id"/"user-id"/) you get a list of all exercise results of an exam instead of only getting the exercise results of the exercise with its unique id mentioned in the request url.