From d5b8cb03906b8ae16b058dd70444cce8b7bd4fb5 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Sun, 5 May 2019 16:19:12 +0800 Subject: [PATCH] 1 --- app/controllers/myshixuns_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/myshixuns_controller.rb b/app/controllers/myshixuns_controller.rb index e0157b67..8c5af420 100644 --- a/app/controllers/myshixuns_controller.rb +++ b/app/controllers/myshixuns_controller.rb @@ -557,7 +557,8 @@ class MyshixunsController < ApplicationController if !resubmit.blank? game.update_attributes!(:retry_status => 1, :resubmit_identifier => resubmit) else - game.update_attributes!(:status => 0) + score = ((challenge.score * test_set_score) / 100.to_f).to_i + game.update_attributes!(:status => 0, :final_score => score) end end test_cases_time = format("%.3f", (Time.now.to_f - t1.to_f)).to_f