Make note "not graded" optional for linters

This commit is contained in:
Sebastian Serth
2020-11-09 21:19:24 +01:00
parent 69db6f98cf
commit 84c291626f
3 changed files with 10 additions and 3 deletions

View File

@ -29,13 +29,18 @@ module SubmissionScoring
waiting_for_container_time: output[:waiting_for_container_time]
)
filename = file.name_with_extension
if file.teacher_defined_linter?
LinterCheckRun.create_from(testrun, assessment)
assessment = assessor.translate_linter(assessment)
# replace file name with hint if linter is not used for grading. Refactor!
filename = t('exercises.implement.not_graded') if file.weight.zero?
end
output.merge!(assessment)
output.merge!(filename: file.name_with_extension, message: feedback_message(file, output), weight: file.weight)
output.merge!(filename: filename, message: feedback_message(file, output), weight: file.weight)
# end
end
end