diff --git a/app/controllers/concerns/submission_scoring.rb b/app/controllers/concerns/submission_scoring.rb index 93794e65..83d5f4fd 100644 --- a/app/controllers/concerns/submission_scoring.rb +++ b/app/controllers/concerns/submission_scoring.rb @@ -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 diff --git a/config/locales/de.yml b/config/locales/de.yml index e36b03ea..8ae9e2b8 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -387,7 +387,8 @@ de: messages: Meldungen feedback: Feedback test_file: 'Test-Datei %{number} (%{filename})' - linter_file: 'Linter-Feedback (ohne Punkte)%{number}%{filename}' + linter_file: 'Linter-Feedback %{number}(%{filename})' + not_graded: ohne Punkte hint: Hinweis no_files: Die Aufgabe umfasst noch keine sichtbaren Dateien. no_output: Die letzte Code-Ausführung terminierte am %{timestamp} ohne Ausgabe. diff --git a/config/locales/en.yml b/config/locales/en.yml index 77d2b24f..2fdcad09 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -387,7 +387,8 @@ en: messages: Messages feedback: Feedback test_file: 'Test File %{number} (%{filename})' - linter_file: 'Linter Feedback (not graded)%{number}%{filename}' + linter_file: 'Linter Feedback %{number}(%{filename})' + not_graded: not graded hint: Hint no_files: The exercise does not comprise visible files yet. no_output: The last code run finished on %{timestamp} without any output.