From af683fd28b78e50a3d89d27805342edea57e3ecc Mon Sep 17 00:00:00 2001 From: YaleChen299 Date: Mon, 24 Jul 2023 14:20:17 +0800 Subject: [PATCH] fix credo long line --- lib/cadet/assessments/assessments.ex | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/cadet/assessments/assessments.ex b/lib/cadet/assessments/assessments.ex index 881982022..d6aae9966 100644 --- a/lib/cadet/assessments/assessments.ex +++ b/lib/cadet/assessments/assessments.ex @@ -249,7 +249,8 @@ defmodule Cadet.Assessments do Answer |> join(:inner, [a], s in assoc(a, :submission)) |> where([_, s], s.student_id == ^course_reg.id) - # change a.xp and a.xp_adjustment to 0 if a.is_grading_published is false and return all answers + # change a.xp and a.xp_adjustment to 0 + # if a.is_grading_published is false and return all answers |> select([a, s], %{ a | xp: fragment("CASE WHEN ? THEN ? ELSE 0 END", s.is_grading_published, a.xp), @@ -911,7 +912,8 @@ defmodule Cadet.Assessments do end end - # This function changes the is_grading_published field of the submission to true only if all the answers are graded + # This function changes the is_grading_published field of the submission to true + # only if all the answers are graded # and sends a notification to the student def publish_grading(submission_id, cr = %CourseRegistration{id: course_reg_id, role: role}) when is_ecto_id(submission_id) do