Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into sw_new_course
This commit is contained in:
commit
10ac8eaa35
|
@ -2374,8 +2374,10 @@ module ApplicationHelper
|
|||
link_to "作品(#{homework.student_works.count})",student_work_index_path(:homework => homework.id),:class => "c_blue"
|
||||
else #学生显示提交作品、修改作品等按钮
|
||||
work = cur_user_works_for_homework homework
|
||||
if work.nil?
|
||||
if work.nil? && Time.parse(homework.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d")
|
||||
link_to "提交作品(#{homework.student_works.count})", new_student_work_path(:homework => homework.id),:class => 'c_blue'
|
||||
elsif work.nil? && Time.parse(homework.end_time.to_s).strftime("%Y-%m-%d") < Time.now.strftime("%Y-%m-%d")
|
||||
link_to "补交作品(#{homework.student_works.count})", new_student_work_path(:homework => homework.id),:class => 'c_red'
|
||||
else
|
||||
if homework.homework_detail_manual && homework.homework_detail_manual.comment_status == 2 #匿评作业,且作业状态不是在开启匿评之前
|
||||
link_to "作品匿评", student_work_index_path(:homework => homework.id), :class => 'c_blue', :title => "开启匿评后不可修改作品"
|
||||
|
|
|
@ -23,7 +23,11 @@
|
|||
<% else %>
|
||||
<span class="grey_homework_btn_cir ml5">匿评已禁用</span>
|
||||
<% end %>
|
||||
<span class="green_homework_btn_cir ml5">作品提交中</span>
|
||||
<% if Time.parse(activity.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d")%>
|
||||
<span class="green_homework_btn_cir ml5">作品提交中</span>
|
||||
<% elsif Time.parse(activity.end_time.to_s).strftime("%Y-%m-%d") < Time.now.strftime("%Y-%m-%d") %>
|
||||
<span class="red_homework_btn_cir ml5">作品补交中</span>
|
||||
<% end %>
|
||||
<% elsif activity.homework_detail_manual.comment_status == 2%>
|
||||
<% if activity.anonymous_comment == 0%>
|
||||
<span class="green_homework_btn_cir ml5">匿评中</span>
|
||||
|
|
|
@ -23,7 +23,11 @@
|
|||
<% else %>
|
||||
<span class="grey_homework_btn_cir ml5">匿评已禁用</span>
|
||||
<% end %>
|
||||
<span class="green_homework_btn_cir ml5">作品提交中</span>
|
||||
<% if Time.parse(homework_common.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d")%>
|
||||
<span class="green_homework_btn_cir ml5">作品提交中</span>
|
||||
<% elsif Time.parse(homework_common.end_time.to_s).strftime("%Y-%m-%d") < Time.now.strftime("%Y-%m-%d") %>
|
||||
<span class="red_homework_btn_cir ml5">作品补交中</span>
|
||||
<% end %>
|
||||
<% elsif homework_common.homework_detail_manual.comment_status == 2%>
|
||||
<% if homework_common.anonymous_comment == 0%>
|
||||
<span class="green_homework_btn_cir ml5">匿评中</span>
|
||||
|
|
43
db/schema.rb
43
db/schema.rb
|
@ -528,23 +528,26 @@ ActiveRecord::Schema.define(:version => 20151113025751) do
|
|||
add_index "documents", ["created_on"], :name => "index_documents_on_created_on"
|
||||
add_index "documents", ["project_id"], :name => "documents_project_id"
|
||||
|
||||
create_table "dts", :force => true do |t|
|
||||
t.string "IPLineCode"
|
||||
t.string "Description"
|
||||
t.string "Num"
|
||||
t.string "Variable"
|
||||
t.string "TraceInfo"
|
||||
t.string "Method"
|
||||
create_table "dts", :primary_key => "Num", :force => true do |t|
|
||||
t.string "Defect", :limit => 50
|
||||
t.string "Category", :limit => 50
|
||||
t.string "File"
|
||||
t.string "IPLine"
|
||||
t.string "Review"
|
||||
t.string "Category"
|
||||
t.string "Defect"
|
||||
t.string "PreConditions"
|
||||
t.string "StartLine"
|
||||
t.string "Method"
|
||||
t.string "Module", :limit => 20
|
||||
t.string "Variable", :limit => 50
|
||||
t.integer "StartLine"
|
||||
t.integer "IPLine"
|
||||
t.string "IPLineCode", :limit => 200
|
||||
t.string "Judge", :limit => 15
|
||||
t.integer "Review", :limit => 1
|
||||
t.string "Description"
|
||||
t.text "PreConditions", :limit => 2147483647
|
||||
t.text "TraceInfo", :limit => 2147483647
|
||||
t.text "Code", :limit => 2147483647
|
||||
t.integer "project_id"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.integer "id", :null => false
|
||||
end
|
||||
|
||||
create_table "enabled_modules", :force => true do |t|
|
||||
|
@ -868,16 +871,6 @@ ActiveRecord::Schema.define(:version => 20151113025751) do
|
|||
|
||||
add_index "journal_details", ["journal_id"], :name => "journal_details_journal_id"
|
||||
|
||||
create_table "journal_details_copy", :force => true do |t|
|
||||
t.integer "journal_id", :default => 0, :null => false
|
||||
t.string "property", :limit => 30, :default => "", :null => false
|
||||
t.string "prop_key", :limit => 30, :default => "", :null => false
|
||||
t.text "old_value"
|
||||
t.text "value"
|
||||
end
|
||||
|
||||
add_index "journal_details_copy", ["journal_id"], :name => "journal_details_journal_id"
|
||||
|
||||
create_table "journal_replies", :id => false, :force => true do |t|
|
||||
t.integer "journal_id"
|
||||
t.integer "user_id"
|
||||
|
|
|
@ -182,6 +182,7 @@ a.f_grey:hover {color:#000000;}
|
|||
/*.upbtn{ margin:42px 0 0 10px; border:none; color:#999; width:150px;}*/
|
||||
.red_btn_cir{ background:#e74c3c; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;}
|
||||
.green_btn_cir{ background:#28be6c; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;}
|
||||
.red_homework_btn_cir{ background:#e74c3c; padding:1px 3px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;}
|
||||
.green_homework_btn_cir{ background:#28be6c; padding:1px 3px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;}
|
||||
.grey_btn_cir{ background:#b2b2b2; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;}
|
||||
.grey_homework_btn_cir{ background:#b2b2b2; padding:1px 3px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;}
|
||||
|
|
|
@ -299,6 +299,7 @@ a:hover.bgreen_n_btn{background:#08a384;}
|
|||
.green_btn_cir{ background:#28be6c; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;}
|
||||
.green_homework_btn_cir{ background:#28be6c; padding:1px 3px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;}
|
||||
.grey_btn_cir{ background:#b2b2b2; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;}
|
||||
.red_homework_btn_cir{ background:#e74c3c; padding:1px 3px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;}
|
||||
.grey_homework_btn_cir{ background:#b2b2b2; padding:1px 3px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;}
|
||||
.blue_btn_cir{ background:#3498db; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;}
|
||||
.orange_btn_cir{ background:#e67e22; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;}
|
||||
|
|
Loading…
Reference in New Issue