修改代码评测的一个BUG

This commit is contained in:
yuanke 2016-04-15 19:20:24 +08:00
parent c1c20fda3b
commit fcfd17c8c9
1 changed files with 4 additions and 3 deletions

View File

@ -141,11 +141,12 @@ class StudentWorkController < ApplicationController
if result["status"].to_i != -2
result["results"].first['user_wait'] = tUsedtime
if result["results"][0]["status"].to_i == 2
result["status"] = 2
end
end
if result["results"][0]["status"].to_i == 2
result["status"] = 2
end
status = result["status"]
if index == 1
student_work_test = student_work.student_work_tests.build(status: status,