Hide linter in week 1 and 2 of Python course

This commit is contained in:
Sebastian Serth
2021-03-08 23:20:42 +01:00
parent 8ebe59b692
commit 39467ad0e0
2 changed files with 37 additions and 0 deletions

View File

@ -92,5 +92,13 @@ module SubmissionScoring
output.except!(:error_messages, :count, :failed, :filename, :message, :passed, :stderr, :stdout)
end
end
# Return all test results except for those of a linter if not allowed
show_linter = Python20CourseWeek.show_linter? submission.exercise
outputs&.reject do |output|
next if show_linter || output.blank?
output[:file_role] == 'teacher_defined_linter'
end
end
end