We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8523133 commit 907249aCopy full SHA for 907249a
app/models/submission.rb
@@ -158,8 +158,11 @@ def calculate_score(requesting_user)
158
score_file(output, file, requesting_user)
159
end
160
161
- # We sort the files again, so that the linter tests are displayed last.
162
- file_scores&.sort_by! {|file| file[:file_role] == 'teacher_defined_linter' ? 1 : 0 }
+ # We sort the files again, so that *optional* linter tests are displayed last.
+ # All other files are sorted alphabetically.
163
+ file_scores&.sort_by! do |file|
164
+ [file[:file_role] == 'teacher_defined_linter' && file[:weight].zero? ? 1 : 0, file[:filename]]
165
+ end
166
combine_file_scores(file_scores)
167
168
0 commit comments