Merge branch 'dev_shixun_project' of https://git.trustie.net/jacknudt/trustieforge into dev_shixun_project
This commit is contained in:
commit
ac7959bb21
|
@ -77,7 +77,7 @@
|
|||
<% end %>
|
||||
</li>
|
||||
<li class="clearfix">
|
||||
<label class="panel-form-label fl">测试集设置:</label>
|
||||
<label class="panel-form-label fl">测试用例:</label>
|
||||
<ul class="fl task-bg-grey">
|
||||
<li class="clearfix">
|
||||
<% if params[:action] == "edit" && @challenge.test_sets.count > 0 %>
|
||||
|
@ -93,7 +93,7 @@
|
|||
<% end %>
|
||||
</p>
|
||||
<input type="text" class="panel-form-width-670 panel-form-height-30 mb10" name="program[input][]" id="textarea_input_test" value="<%= test.input %>"/>
|
||||
<input type="text" class="panel-form-width-670 panel-form-height-30" name="program[output][]" id="textarea_output_test" value="<%= test.output %>" />
|
||||
<textarea class="panel-form-width-670 fl" style="height: 150px;" id="textarea_output_test" name="program[output][]" placeholder="输入用例内容" ><%= test.output %></textarea>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<p class="clearfix">
|
||||
|
@ -101,8 +101,8 @@
|
|||
<span class="color-grey fr" style="font-size:12px;">温馨提示:在学员"提交评测"时进行自动检测。</span>
|
||||
<a href="javascript:void(0);" title="增加" class="test_icon_add"><i class="fa fa-plus-circle color-grey font-16 ml10 fl mt12"></i></a>
|
||||
</p>
|
||||
<input type="text" class="panel-form-width-670 panel-form-height-30 mb10" name="program[input][]" id="textarea_input_test" placeholder="测试输入" />
|
||||
<input type="text" class="panel-form-width-670 panel-form-height-30" name="program[output][]" id="textarea_output_test" placeholder="测试输出" />
|
||||
<input type="text" class="panel-form-width-670 panel-form-height-30 mb10" name="program[input][]" id="textarea_input_test" placeholder="输入用例名" />
|
||||
<textarea class="panel-form-width-670 fl" style="height: 150px;" id="textarea_output_test" name="program[output][]" placeholder="输入用例内容" ></textarea>
|
||||
<% end %>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -20,18 +20,4 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<% if false %>
|
||||
<!--新建缺陷开始-->
|
||||
<div class="pro_new_con mb10">
|
||||
<div class="pro-task-new-con clear">
|
||||
<%#= call_hook(:view_issues_new_top, {:training_task => @training_task}) %>
|
||||
<%= labelled_form_for @challenge, :url => shixun_challenges_path(@shixun) do |f| %>
|
||||
<%= error_messages_for 'training_task' %>
|
||||
<div>
|
||||
<%= render :partial => 'form', :locals => {:f => f} %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
class ModifiedTypeToTestSets < ActiveRecord::Migration
|
||||
def up
|
||||
change_column :test_sets, :output, :text
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
39
db/schema.rb
39
db/schema.rb
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20170322033103) do
|
||||
ActiveRecord::Schema.define(:version => 20170323081518) do
|
||||
|
||||
create_table "activities", :force => true do |t|
|
||||
t.integer "act_id", :null => false
|
||||
|
@ -1157,8 +1157,8 @@ ActiveRecord::Schema.define(:version => 20170322033103) do
|
|||
t.string "name"
|
||||
t.integer "user_id"
|
||||
t.text "description"
|
||||
t.datetime "publish_time"
|
||||
t.datetime "end_time"
|
||||
t.date "publish_time"
|
||||
t.date "end_time"
|
||||
t.integer "homework_type", :default => 1
|
||||
t.string "late_penalty"
|
||||
t.integer "course_id"
|
||||
|
@ -1255,19 +1255,6 @@ ActiveRecord::Schema.define(:version => 20170322033103) do
|
|||
t.datetime "updated_at", :null => false
|
||||
end
|
||||
|
||||
create_table "ii", :force => true do |t|
|
||||
t.integer "project_id"
|
||||
t.string "author_login"
|
||||
t.string "rep_identifier"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.integer "sonar_version", :default => 0
|
||||
t.string "path"
|
||||
t.string "branch"
|
||||
t.string "language"
|
||||
t.string "sonar_name"
|
||||
end
|
||||
|
||||
create_table "innodb_monitor", :id => false, :force => true do |t|
|
||||
t.integer "a"
|
||||
end
|
||||
|
@ -2146,17 +2133,21 @@ ActiveRecord::Schema.define(:version => 20170322033103) do
|
|||
t.string "name"
|
||||
t.text "description"
|
||||
t.text "script"
|
||||
t.boolean "is_public", :default => true
|
||||
t.boolean "is_public", :default => true
|
||||
t.integer "parent_id"
|
||||
t.integer "user_id"
|
||||
t.integer "gpid"
|
||||
t.integer "forked_count", :default => 0
|
||||
t.integer "visits", :default => 0
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.integer "forked_count", :default => 0
|
||||
t.integer "visits", :default => 0
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.integer "changeset_num"
|
||||
t.integer "forked_form"
|
||||
t.integer "status", :default => 0
|
||||
t.integer "status", :default => 0
|
||||
t.text "ready_knowledge"
|
||||
t.text "task_pass"
|
||||
t.text "answer"
|
||||
t.integer "score"
|
||||
end
|
||||
|
||||
create_table "softapplications", :force => true do |t|
|
||||
|
@ -2397,7 +2388,7 @@ ActiveRecord::Schema.define(:version => 20170322033103) do
|
|||
|
||||
create_table "test_sets", :force => true do |t|
|
||||
t.string "input"
|
||||
t.string "output"
|
||||
t.text "output"
|
||||
t.integer "challenge_id"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
|
@ -2452,7 +2443,7 @@ ActiveRecord::Schema.define(:version => 20170322033103) do
|
|||
t.datetime "updated_at", :null => false
|
||||
t.integer "author_id"
|
||||
t.integer "status", :limit => 1, :default => 0
|
||||
t.integer "position", :limit => 1, :default => 0
|
||||
t.integer "position", :limit => 1
|
||||
t.integer "result", :default => 0
|
||||
end
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ module Trustie
|
|||
snippets_enabled: false,
|
||||
public: false,
|
||||
user_id: gid,
|
||||
visibility_level: shixun.is_public? ? UserLevel::PUBLIC : UserLevel::PRIVATE
|
||||
visibility_level: UserLevel::PUBLIC
|
||||
)
|
||||
shixun.gpid = gshixun.id
|
||||
shixun.save!
|
||||
|
|
Loading…
Reference in New Issue