@@ -101,21 +101,6 @@ def postprocess_orca_response(grade, response)
101
101
grade . updated_at = DateTime . current
102
102
grade . available = true
103
103
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
119
104
else
120
105
begin
121
106
output = response [ :output ]
@@ -140,24 +125,6 @@ def postprocess_orca_response(grade, response)
140
125
grade . updated_at = DateTime . current
141
126
grade . available = true
142
127
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
161
128
when "plaintext"
162
129
Audit . log ( "Not yet implemented: plaintext response for SandboxGrader(#{ self . id } ).postprocess_orca_response" )
163
130
end
0 commit comments