From fcfd17c8c919fee15f4bfc5d0e4761bd5a86fbb9 Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Fri, 15 Apr 2016 19:20:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=A3=E7=A0=81=E8=AF=84?= =?UTF-8?q?=E6=B5=8B=E7=9A=84=E4=B8=80=E4=B8=AABUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/student_work_controller.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index 2849bdf90..89ee77053 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -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,