Skip to content

Commit c96d65b

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 424392b commit c96d65b

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

app/controllers/assignments_controller.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ def download_test_results
280280
test_groups: @assignment.test_groups,
281281
latest:,
282282
student_run:,
283-
instructor_run:,
283+
instructor_run:
284284
)
285285

286286
respond_to do |format|
@@ -290,7 +290,7 @@ def download_test_results
290290
if latest
291291
send_data(
292292
data,
293-
type: "application/json",
293+
type: 'application/json',
294294
disposition: 'attachment',
295295
filename: "#{@assignment.short_identifier}_test_results.json"
296296
)

app/helpers/summary_test_results_helper.rb

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,24 @@ def base_query(latest:)
2424

2525
def fetch_with_query(test_groups:, query:)
2626
latest_test_runs = TestRun
27-
.joins(grouping: :group)
28-
.joins("INNER JOIN (#{query.to_sql}) latest_test_run_by_grouping \
27+
.joins(grouping: :group)
28+
.joins("INNER JOIN (#{query.to_sql}) latest_test_run_by_grouping \
2929
ON latest_test_run_by_grouping.grouping_id = test_runs.grouping_id \
3030
AND latest_test_run_by_grouping.test_runs_created_at = test_runs.created_at")
31-
.select('id', 'test_runs.grouping_id', 'groups.group_name')
32-
.to_sql
31+
.select('id', 'test_runs.grouping_id', 'groups.group_name')
32+
.to_sql
3333

3434
test_groups.joins(test_group_results: :test_results)
35-
.joins("INNER JOIN (#{latest_test_runs}) latest_test_runs \
35+
.joins("INNER JOIN (#{latest_test_runs}) latest_test_runs \
3636
ON test_group_results.test_run_id = latest_test_runs.id")
37-
.select('test_groups.name',
38-
'test_groups.id as test_groups_id',
39-
'latest_test_runs.group_name',
40-
'test_results.name as test_result_name',
41-
'test_results.status',
42-
'test_results.marks_earned',
43-
'test_results.marks_total',
44-
:output, :extra_info, :error_type)
37+
.select('test_groups.name',
38+
'test_groups.id as test_groups_id',
39+
'latest_test_runs.group_name',
40+
'test_results.name as test_result_name',
41+
'test_results.status',
42+
'test_results.marks_earned',
43+
'test_results.marks_total',
44+
:output, :extra_info, :error_type)
4545
end
4646
end
4747
end
@@ -90,7 +90,7 @@ def as_csv
9090

9191
def as_json
9292
@test_results.group_by(&:group_name).transform_values do |grouping|
93-
grouping.group_by(&:name)
93+
grouping.group_by(&:name)
9494
end.to_json
9595
end
9696
end

0 commit comments

Comments
 (0)