Skip to content

Commit

Permalink
feat: Acknowledge grading notification when unsubmitting submission
Browse files Browse the repository at this point in the history
  • Loading branch information
GabrielCWT committed Aug 27, 2024
1 parent ea4e72a commit ff7183c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/cadet/assessments/assessments.ex
Original file line number Diff line number Diff line change
Expand Up @@ -1139,6 +1139,13 @@ defmodule Cadet.Assessments do
)
end

# Remove grading notifications for submissions
Notification
|> where(submission_id: ^submission_id, type: :submitted)
|> select([n], n.id)
|> Repo.all()
|> Notifications.acknowledge(cr)

{:ok, nil}
else
{:submission_found?, false} ->
Expand Down

0 comments on commit ff7183c

Please sign in to comment.