From 2ac827c66fd999b1efd42f6a1362889c37681d97 Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Mon, 26 Sep 2016 09:44:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=A3=E7=A0=81=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E5=87=BA=E9=94=99=E6=97=B6=E7=9A=84=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/student_work_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index f6a97e66c..cd80575a2 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -106,13 +106,13 @@ class StudentWorkController < ApplicationController rescue Timeout::Error tEndtime = Time.now tUsedtime = (tEndtime.to_i-tStarttime.to_i)*1000+(tEndtime.usec - tStarttime.usec)/1000 - logger.debug "program_test_ex user wait time = #{tUsedtime} 毫秒" + logger.info "program_test_ex user wait time = #{tUsedtime} 毫秒" #status 0:答案正确 -5program_test_ex 函数出错 -4judge代码出错 -3http超时 -2:编译错误 -1:答案错误 2:程序运行超时 resultObj[:status] = -3 CodeTests.create(:homework_id=>@homework.id,:language=>@homework.homework_detail_programing.language,:status=>-3,:wait_time=>tUsedtime,:student_work_id=>student_work.id) rescue => e #-4 judge代码 出错 - logger.debug "program_test_error #{e}" + logger.info "program_test_error #{e}" resultObj[:status] = -4 tmpstatus = -4 CodeTests.create(:homework_id=>@homework.id,:language=>@homework.homework_detail_programing.language,:status=>tmpstatus,:time_used=>0,:wait_time=>0,:student_work_id=>student_work.id) @@ -217,7 +217,7 @@ class StudentWorkController < ApplicationController end rescue #-5 program_test_ex 函数出错 - logger.debug "program_test_error 2" + logger.info "program_test_error 2" resultObj[:status] = -5 tmpstatus = -5 CodeTests.create(:homework_id=>@homework.id,:language=>@homework.homework_detail_programing.language,:status=>tmpstatus,:time_used=>0,:wait_time=>0,:student_work_id=>student_work.id)