Skip to content

Commit

Permalink
fix: Mark notifications for grading as read when publishing grading
Browse files Browse the repository at this point in the history
  • Loading branch information
GabrielCWT committed Aug 26, 2024
1 parent 2d43f01 commit c1108e0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/cadet/assessments/assessments.ex
Original file line number Diff line number Diff line change
Expand Up @@ -1250,6 +1250,12 @@ defmodule Cadet.Assessments do
:published_grading
)

Notification
|> where([submission_id: ^submission.id, type: :submitted])
|> select([n], n.id)
|> Repo.all()
|> Notifications.acknowledge(cr)

{:ok, nil}

{:submission_found?, false} ->
Expand Down

0 comments on commit c1108e0

Please sign in to comment.