Skip to content

Commit 89919a7

Browse files
author
Ben Lerner
committed
test graders don't make inline comments after all
1 parent b4205f0 commit 89919a7

File tree

1 file changed

+0
-33
lines changed

1 file changed

+0
-33
lines changed

app/models/graders/sandbox_grader.rb

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -101,21 +101,6 @@ def postprocess_orca_response(grade, response)
101101
grade.updated_at = DateTime.current
102102
grade.available = true
103103
grade.save!
104-
InlineComment.transaction do
105-
InlineComment.where(submission: sub, grade: grade).destroy_all
106-
InlineComment.create!(
107-
submission: sub,
108-
title: "Errors",
109-
filename: Upload.upload_path_for(sub.upload.extracted_path.to_s),
110-
line: 0,
111-
grade: grade,
112-
user: nil,
113-
label: "general",
114-
severity: InlineComment::severities["error"],
115-
weight: self.avail_score,
116-
comment: response[:errors].join('\n'),
117-
suppressed: false)
118-
end
119104
else
120105
begin
121106
output = response[:output]
@@ -140,24 +125,6 @@ def postprocess_orca_response(grade, response)
140125
grade.updated_at = DateTime.current
141126
grade.available = true
142127
grade.save!
143-
InlineComment.transaction do
144-
InlineComment.where(submission: sub, grade: grade).destroy_all
145-
ics = json['tests'].map.with_index do |t, i|
146-
InlineComment.new(
147-
submission: sub,
148-
title: t['name'] || t['comment'] || '',
149-
filename: Upload.upload_path_for(t['filename'] || sub.upload.extracted_path.to_s),
150-
line: t['line']&.to_i || (i + 1),
151-
grade: grade,
152-
user: nil,
153-
label: 'general',
154-
comment: t['output'],
155-
weight: t['score'].to_f,
156-
severity: InlineComment::severities["info"],
157-
suppressed: false)
158-
end
159-
InlineComment.import ics
160-
end
161128
when "plaintext"
162129
Audit.log("Not yet implemented: plaintext response for SandboxGrader(#{self.id}).postprocess_orca_response")
163130
end

0 commit comments

Comments
 (0)