Merge branch 'dev_shixun_project' of https://git.trustie.net/jacknudt/trustieforge into dev_shixun_project
This commit is contained in:
commit
b87f095556
|
@ -25,6 +25,7 @@
|
||||||
<li class="clearfix">
|
<li class="clearfix">
|
||||||
<label class=" panel-form-label fl"><span class="c_red mr5">*</span>名称:</label>
|
<label class=" panel-form-label fl"><span class="c_red mr5">*</span>名称:</label>
|
||||||
<%= f.text_field :subject, :class => "panel-form-width-690 panel-form-height-30 fl", :no_label => true, :placeholder => "请输入当前任务的名称(此信息将提前泄露给学员)" %>
|
<%= f.text_field :subject, :class => "panel-form-width-690 panel-form-height-30 fl", :no_label => true, :placeholder => "请输入当前任务的名称(此信息将提前泄露给学员)" %>
|
||||||
|
<span style="display: none" class="c_red ml90" id="new_shixun_name">任务名称不能为空</span>
|
||||||
</li>
|
</li>
|
||||||
<li class="clearfix">
|
<li class="clearfix">
|
||||||
<label class=" panel-form-label fl">预备知识:</label>
|
<label class=" panel-form-label fl">预备知识:</label>
|
||||||
|
@ -33,6 +34,7 @@
|
||||||
<li class="clearfix">
|
<li class="clearfix">
|
||||||
<label class=" panel-form-label fl"><span class="c_red mr5">*</span>过关任务:</label>
|
<label class=" panel-form-label fl"><span class="c_red mr5">*</span>过关任务:</label>
|
||||||
<%= f.text_area :task_pass, :class => "panel-form-width-690 panel-form-height-150 fl task-textarea-pd", :no_label => true %>
|
<%= f.text_area :task_pass, :class => "panel-form-width-690 panel-form-height-150 fl task-textarea-pd", :no_label => true %>
|
||||||
|
<span style="display: none" class="c_red ml90" id="new_shixun_pass">过关任务不能为空</span>
|
||||||
</li>
|
</li>
|
||||||
<li class="clearfix">
|
<li class="clearfix">
|
||||||
<label class=" panel-form-label fl">样例设置:</label>
|
<label class=" panel-form-label fl">样例设置:</label>
|
||||||
|
@ -72,7 +74,7 @@
|
||||||
<button class="close fl mt3 mr10" type="button" onclick="$('#add_shixun_skill').slideToggle();">+</button>
|
<button class="close fl mt3 mr10" type="button" onclick="$('#add_shixun_skill').slideToggle();">+</button>
|
||||||
<div class="task-tag tag-grey mb10 mr10 fl undis" id="add_shixun_skill">
|
<div class="task-tag tag-grey mb10 mr10 fl undis" id="add_shixun_skill">
|
||||||
<button data-dismiss="alert" class="close fr mt3 ml5" type="button" onclick="$('#add_shixun_skill').slideToggle();">×</button>
|
<button data-dismiss="alert" class="close fr mt3 ml5" type="button" onclick="$('#add_shixun_skill').slideToggle();">×</button>
|
||||||
<input type="text" class=" task-tag-input" placeholder="请输入完成本任务得到的技能(1个)" />
|
<input type="text" class="task-tag-input" placeholder="请输入知识/技能点" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
@ -157,7 +159,19 @@
|
||||||
autoTextarea2(text3, text4, 0, 140);
|
autoTextarea2(text3, text4, 0, 140);
|
||||||
autoTextarea2(text4, text3, 0, 140);
|
autoTextarea2(text4, text3, 0, 140);
|
||||||
|
|
||||||
|
$("#challenge_subject").keydown(function(){
|
||||||
|
$("#new_shixun_name").hide();
|
||||||
|
});
|
||||||
|
$("#challenge_subject").keydown(function(){
|
||||||
|
$("#new_shixun_pass").hide();
|
||||||
|
});
|
||||||
function challenge_create(){
|
function challenge_create(){
|
||||||
|
if($('#challenge_subject').val().trim() == ""){
|
||||||
|
$("#new_shixun_name").show();
|
||||||
|
}else if($("#challenge_task_pass").val().trim() == ""){
|
||||||
|
$("#new_shixun_pass").show();
|
||||||
|
}else{
|
||||||
$('#new_challenge').submit();
|
$('#new_challenge').submit();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
35
db/schema.rb
35
db/schema.rb
|
@ -1144,8 +1144,8 @@ ActiveRecord::Schema.define(:version => 20170315103005) do
|
||||||
t.string "name"
|
t.string "name"
|
||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
t.text "description"
|
t.text "description"
|
||||||
t.date "publish_time"
|
t.datetime "publish_time"
|
||||||
t.date "end_time"
|
t.datetime "end_time"
|
||||||
t.integer "homework_type", :default => 1
|
t.integer "homework_type", :default => 1
|
||||||
t.string "late_penalty"
|
t.string "late_penalty"
|
||||||
t.integer "course_id"
|
t.integer "course_id"
|
||||||
|
@ -1242,6 +1242,19 @@ ActiveRecord::Schema.define(:version => 20170315103005) do
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
end
|
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|
|
create_table "innodb_monitor", :id => false, :force => true do |t|
|
||||||
t.integer "a"
|
t.integer "a"
|
||||||
end
|
end
|
||||||
|
@ -2112,21 +2125,17 @@ ActiveRecord::Schema.define(:version => 20170315103005) do
|
||||||
t.string "name"
|
t.string "name"
|
||||||
t.text "description"
|
t.text "description"
|
||||||
t.text "script"
|
t.text "script"
|
||||||
t.boolean "is_public", :default => true
|
t.boolean "is_public", :default => true
|
||||||
t.integer "parent_id"
|
t.integer "parent_id"
|
||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
t.integer "gpid"
|
t.integer "gpid"
|
||||||
t.integer "forked_count", :default => 0
|
t.integer "forked_count", :default => 0
|
||||||
t.integer "visits", :default => 0
|
t.integer "visits", :default => 0
|
||||||
t.datetime "created_at", :null => false
|
t.datetime "created_at", :null => false
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
t.integer "changeset_num"
|
t.integer "changeset_num"
|
||||||
t.integer "forked_form"
|
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
|
end
|
||||||
|
|
||||||
create_table "softapplications", :force => true do |t|
|
create_table "softapplications", :force => true do |t|
|
||||||
|
@ -2421,7 +2430,7 @@ ActiveRecord::Schema.define(:version => 20170315103005) do
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
t.integer "author_id"
|
t.integer "author_id"
|
||||||
t.integer "status", :limit => 1, :default => 0
|
t.integer "status", :limit => 1, :default => 0
|
||||||
t.integer "position", :limit => 1
|
t.integer "position", :limit => 1, :default => 0
|
||||||
t.integer "result", :default => 0
|
t.integer "result", :default => 0
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue