@@ -83,28 +83,8 @@ def to_s
83
83
end
84
84
end
85
85
86
- protected
87
-
88
- def get_grading_script ( sub )
89
- JSON . load ( File . open ( self . upload . extracted_files . to_h { |v | [ v [ :path ] , v [ :full_path ] ] } [ "grading_script.json" ] ) )
90
- end
91
-
92
- def generate_files_hash ( sub )
93
- files = {
94
- submission : {
95
- url : sub . upload . url ,
96
- mime_type : sub . upload . read_metadata [ :mimetype ] ,
97
- should_replace_paths : false
98
- } ,
99
- grader : {
100
- url : self . upload . url ,
101
- mime_type : self . upload . read_metadata [ :mimetype ] ,
102
- should_replace_paths : false
103
- }
104
- }
105
- end
106
-
107
- def postprocess_orca_response ( grade , response )
86
+ def postprocess_orca_response ( grade , response )
87
+ Audit . log ( "In SandboxGrader(#{ self . id } ).postprocess_orca_response(#{ grade . id } , #{ response . inspect } )"
108
88
sub = grade . submission
109
89
prefix = "Assignment #{ assignment . id } , submission #{ sub . id } "
110
90
if response [ 'errors' ] . present?
@@ -163,13 +143,36 @@ def postprocess_orca_response(grade, response)
163
143
InlineComment . import ics
164
144
end
165
145
when "plaintext"
146
+ Audit . log ( "Not yet implemented: plaintext response for SandboxGrader(#{ self . id } ).postprocess_orca_response" )
166
147
end
167
148
rescue Exception => e
168
149
Audit . log ( "#{ prefix } : #{ self . response_type } error: #{ e } " )
169
150
record_compile_error ( sub , grade )
170
151
end
171
152
end
172
153
end
154
+
155
+ protected
156
+
157
+ def get_grading_script ( sub )
158
+ JSON . load ( File . open ( self . upload . extracted_files . to_h { |v | [ v [ :path ] , v [ :full_path ] ] } [ "grading_script.json" ] ) )
159
+ end
160
+
161
+ def generate_files_hash ( sub )
162
+ files = {
163
+ submission : {
164
+ url : sub . upload . url ,
165
+ mime_type : sub . upload . read_metadata [ :mimetype ] ,
166
+ should_replace_paths : false
167
+ } ,
168
+ grader : {
169
+ url : self . upload . url ,
170
+ mime_type : self . upload . read_metadata [ :mimetype ] ,
171
+ should_replace_paths : false
172
+ }
173
+ }
174
+ end
175
+
173
176
174
177
def do_grading ( assignment , sub )
175
178
# Nothing to do, since Orca will handle it!
0 commit comments