|
|
@ -110,9 +110,9 @@ class StudentWorkController < ApplicationController
|
|
|
|
#status 0:答案正确 -5program_test_ex 函数出错 -4judge代码出错 -3http超时 -2:编译错误 -1:答案错误 2:程序运行超时
|
|
|
|
#status 0:答案正确 -5program_test_ex 函数出错 -4judge代码出错 -3http超时 -2:编译错误 -1:答案错误 2:程序运行超时
|
|
|
|
resultObj[:status] = -3
|
|
|
|
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)
|
|
|
|
CodeTests.create(:homework_id=>@homework.id,:language=>@homework.homework_detail_programing.language,:status=>-3,:wait_time=>tUsedtime,:student_work_id=>student_work.id)
|
|
|
|
rescue
|
|
|
|
rescue => e
|
|
|
|
#-4 judge代码 出错
|
|
|
|
#-4 judge代码 出错
|
|
|
|
logger.debug "program_test_error 1"
|
|
|
|
logger.debug "program_test_error #{e}"
|
|
|
|
resultObj[:status] = -4
|
|
|
|
resultObj[:status] = -4
|
|
|
|
tmpstatus = -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)
|
|
|
|
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)
|
|
|
|