From 8b7bce39bb74bf28dbec95a5b67b13220aaf2604 Mon Sep 17 00:00:00 2001 From: Alec Zhou Date: Mon, 13 May 2019 14:51:28 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BB=91=E5=AE=9A?= =?UTF-8?q?=E9=82=AE=E7=AE=B1=E7=9A=84=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/subjects_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/subjects_helper.rb b/app/helpers/subjects_helper.rb index 0a8d659f..6c5e240f 100644 --- a/app/helpers/subjects_helper.rb +++ b/app/helpers/subjects_helper.rb @@ -46,7 +46,7 @@ module SubjectsHelper content = if (shixun.status == 2 && !shixun.hidden) || User.current.manager_of_shixun?(shixun) content_before = "查看详情" if User.current.try(:mail).blank? - %Q{开始实战} + %Q{开始实战} elsif shixun.challenges_count > 0 if is_modify.blank? %Q{#{link_to '开始实战', shixun_exec_shixun_path(shixun, :is_subject => subject.id), :class => "btn_auto user_bluebg_btn fl none", :id => "shixun_operation", :target => "_blank"}} From 01a9662ac2899e1a872ba9be6ff8a4111190d538 Mon Sep 17 00:00:00 2001 From: jasder Date: Mon, 13 May 2019 16:09:10 +0800 Subject: [PATCH 2/3] =?UTF-8?q?FIX=20=E4=BF=AE=E5=A4=8D=E5=90=88=E4=BD=9C?= =?UTF-8?q?=E4=BC=99=E4=BC=B4=E6=B7=BB=E5=8A=A0=E5=AE=A2=E6=88=B7=E5=90=8E?= =?UTF-8?q?=EF=BC=8C=E4=B8=8E=E6=88=91=E7=9A=84=E8=8F=9C=E5=8D=95=E4=B8=AD?= =?UTF-8?q?=20'=E5=AE=A2=E6=88=B7=E7=AE=A1=E7=90=86'=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E4=B8=8D=E4=B8=80=E8=87=B4=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/managements_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/managements_controller.rb b/app/controllers/managements_controller.rb index a1bc853b..775b1947 100644 --- a/app/controllers/managements_controller.rb +++ b/app/controllers/managements_controller.rb @@ -1267,7 +1267,8 @@ end if school.present? customer = Customer.new(school_id: s) customer.save! - PartnerCustomer.create(partner_id: partner_id,customer_id: customer.id ) + PartnerCustomer.create!(partner_id: partner_id,customer_id: customer.id ) + school.update_attributes(customer_id: customer.id) end end render :json => {status: 1, message: "创建成功!"} From b139d1cf2812caa70663f9de67e25cf11b94e884 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Mon, 13 May 2019 18:03:38 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=AF=84=E6=B5=8B=E7=AD=96=E7=95=A5?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/myshixuns_controller.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controllers/myshixuns_controller.rb b/app/controllers/myshixuns_controller.rb index e0157b67..63477b9d 100644 --- a/app/controllers/myshixuns_controller.rb +++ b/app/controllers/myshixuns_controller.rb @@ -466,7 +466,8 @@ class MyshixunsController < ApplicationController end # taskId 即返回的game id - # 返回结果:params [:stauts] 0 表示成功,其它则失败 + # 返回结果:params [:stauts] 0 表示运行结果成功,其它则失败 + # compile_success 1 表示成功; 0表示失败 # msg 错误信息 # output 为测试用户编译输出结果 # myshixun:status 1为完成实训 @@ -526,7 +527,7 @@ class MyshixunsController < ApplicationController logger.info("training_task_status start#3**#{game_id}**** #{Time.now.strftime("%Y-%m-%d %H:%M:%S.%L")}") # status:0表示评测成功 - if status == "0" + if compile_success.to_i == 1 && status == "0" if !resubmit.blank? game.update_attributes!(:retry_status => 2, :resubmit_identifier => resubmit) #if game.had_done == 1