diff --git a/lib/runner.rb b/lib/runner.rb --- a/lib/runner.rb +++ b/lib/runner.rb @@ -20,6 +20,7 @@ @engine.grade(submission) task.status_complete! end +# @grader_process.report_inactive if @grader_process!=nil return task end @@ -45,6 +46,8 @@ @engine.grade(test_request) test_request.status_complete! end + +# @grader_process.report_inactive if @grader_process!=nil return test_request end diff --git a/lib/test_request_helper.rb b/lib/test_request_helper.rb --- a/lib/test_request_helper.rb +++ b/lib/test_request_helper.rb @@ -21,6 +21,15 @@ def produce_grading_room(test_request) grading_room = grading_room_dir(test_request) FileUtils.mkdir_p(grading_room) + + # + # Also copy additional submitted file to this directory as well. + # The program would see this file only if it is copied + # to the sandbox directory later. The run script should do it. + # + cmd = "cp #{test_request.input_file_name}.files/* #{grading_room}" + system(cmd) + grading_room end @@ -57,9 +66,10 @@ def grading_room_dir(test_request) problem_name = test_request.problem_name user = test_request.user - "#{@config.user_result_dir}" + + grading_room = "#{@config.user_result_dir}" + "/#{user.login}/test_request" + "/#{problem_name}/#{test_request.id}" + grading_room end def problem_home_dir(test_request)