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 @@
- + value="0" id="All_tests" class="ml-3 mr5 magic-radio" onchange="hideSystem_score_percentage()"/> @@ -178,7 +178,7 @@
- + value="1" id="Partial_test" class="ml5 mr5 magic-radio" onchange="showSystem_score_percentage()"/> @@ -186,7 +186,7 @@ -
  • +
  • " id="System_score_percentage"> @@ -211,7 +211,7 @@ *组1 - + " name="percentagenumbox"> % @@ -237,8 +237,8 @@ 组<%= index + 1 %> - - + " name="percentagenumbox"> + % @@ -328,10 +328,10 @@ $(function(){ //填写百分比初始化 - $("#All_tests").attr('checked', 'checked'); - if($("#All_tests").is(":checked")){ - $("#System_score_percentage").hide() - } + //$("#All_tests").attr('checked', 'checked'); + //if($("#All_tests").is(":checked")){ + // $("#System_score_percentage").hide() + // } // 设置textarea的宽度到140以后出现滚动条 var test_set_inputs = document.getElementsByName("test_set[input][]");