Skip to content

Commit

Permalink
changed BrightSpaceHandler.GetSubmissions() query
Browse files Browse the repository at this point in the history
  • Loading branch information
akirkinis committed Feb 22, 2024
1 parent 9dee1f1 commit e5cf337
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions IguideME.Web/Services/LMSHandlers/BrightspaceHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -352,16 +352,18 @@ IEnumerable<User> users

using (
NpgsqlDataReader r = Query(
@$"SELECT grade_object_id,
user_id,
points_numerator,
points_denominator,
grade_text,
grade_released_date
FROM grade_results
WHERE org_unit_id = @courseID
AND user_id
IN ({string.Join(",", users.Select((_, index) => $"@userID{index}"))})",
@$"SELECT grade_results.grade_object_id,
users.username,
grade_results.points_numerator,
grade_results.points_denominator,
grade_results.grade_text,
grade_results.grade_released_date
FROM grade_results
INNER JOIN users
ON users.user_id = grade_results.user_id
WHERE org_unit_id = @courseID
AND user_id
IN ({string.Join(",", users.Select((_, index) => $"@userID{index}"))})",
parameters
)
)
Expand Down

0 comments on commit e5cf337

Please sign in to comment.