Skip to content

Commit

Permalink
Merge branch 'master' into No-GC-For-Staff
Browse files Browse the repository at this point in the history
  • Loading branch information
josh1248 committed Sep 8, 2024
2 parents 9e67112 + d867927 commit bb28b7e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/cadet/assessments/assessments.ex
Original file line number Diff line number Diff line change
Expand Up @@ -1021,7 +1021,12 @@ defmodule Cadet.Assessments do
with {:status, :attempted} <- {:status, submission.status},
{:ok, updated_submission} <- update_submission_status(submission) do
# Couple with update_submission_status and update_xp_bonus to ensure notification is sent
Notifications.write_notification_when_student_submits(submission)
submission = Repo.preload(submission, assessment: [:config])

if submission.assessment.config.is_manually_graded do
Notifications.write_notification_when_student_submits(submission)
end

# Send email notification to avenger
%{notification_type: "assessment_submission", submission_id: updated_submission.id}
|> Cadet.Workers.NotificationWorker.new()
Expand Down

0 comments on commit bb28b7e

Please sign in to comment.