From 2c38ada3d53a4d244f2159bdc21e3325b34e23bb Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Sun, 5 May 2019 15:48:47 +0800 Subject: [PATCH] 1 --- app/controllers/challenges_controller.rb | 4 ++-- app/models/test_set.rb | 2 +- .../challenges/_edit_evaluating_page.html.erb | 20 +++++++++---------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/app/controllers/challenges_controller.rb b/app/controllers/challenges_controller.rb index 6c180738..bddff739 100644 --- a/app/controllers/challenges_controller.rb +++ b/app/controllers/challenges_controller.rb @@ -144,8 +144,8 @@ class ChallengesController < ApplicationController @shixun.myshixuns.update_all(:system_tip => 0) end # 关卡评测执行文件如果被修改,需要修改脚本内容 - script = modify_shixun_script @shixun, @shixun.evaluate_script - @shixun.update_column(:evaluate_script, script) + #script = modify_shixun_script @shixun, @shixun.evaluate_script + #@shixun.update_column(:evaluate_script, script) if path != params[:challenge][:path] shixun_modify_status_without_publish(@shixun, 1) end diff --git a/app/models/test_set.rb b/app/models/test_set.rb index 662271e3..999ad073 100644 --- a/app/models/test_set.rb +++ b/app/models/test_set.rb @@ -1,5 +1,5 @@ class TestSet < ActiveRecord::Base default_scope :order => 'id asc' - attr_accessible :challenge_id, :input, :output, :actual_output, :is_public, :result, :position + attr_accessible :challenge_id, :input, :output, :actual_output, :is_public, :result, :position, :score belongs_to :challenge end diff --git a/app/views/challenges/_edit_evaluating_page.html.erb b/app/views/challenges/_edit_evaluating_page.html.erb index 4b1149fb..c36dcd0f 100644 --- a/app/views/challenges/_edit_evaluating_page.html.erb +++ b/app/views/challenges/_edit_evaluating_page.html.erb @@ -166,7 +166,7 @@