实训作业列表的调整
This commit is contained in:
parent
134cedf3d2
commit
7be82d910c
|
|
@ -99,32 +99,32 @@ module StudentWorkHelper
|
|||
project = cur_user_projects_for_homework homework
|
||||
if work.nil? && homework.end_time >= Time.now
|
||||
if homework.homework_type == 4
|
||||
link_to "关联实战", relate_myshixun_student_work_index_path(:homework => homework.id),:class => 'task-btn task-btn-blue fr',:remote => true
|
||||
link_to "关联实战", relate_myshixun_student_work_index_path(:homework => homework.id),:class => 'task-btn task-btn-blue fr mr10 mt8',:remote => true
|
||||
else
|
||||
link_to "提交作品", new_student_work_url_without_domain(homework.id),:class => 'task-btn task-btn-blue fr'
|
||||
link_to "提交作品", new_student_work_url_without_domain(homework.id),:class => 'task-btn task-btn-blue fr mr10 mt8'
|
||||
end
|
||||
elsif work.nil? && homework.end_time < Time.now
|
||||
if homework.allow_late && homework.homework_detail_manual.comment_status < 6
|
||||
if homework.homework_type == 4
|
||||
link_to "关联实战", relate_myshixun_student_work_index_path(:homework => homework.id),:class => 'task-btn task-btn-blue fr',:remote => true
|
||||
link_to "关联实战", relate_myshixun_student_work_index_path(:homework => homework.id),:class => 'task-btn task-btn-blue fr mr10 mt8',:remote => true
|
||||
else
|
||||
link_to "补交作品", new_student_work_url_without_domain(homework.id),:class => 'task-btn task-btn-blue fr'
|
||||
link_to "补交作品", new_student_work_url_without_domain(homework.id),:class => 'task-btn task-btn-blue fr mr10 mt8'
|
||||
end
|
||||
end
|
||||
elsif work
|
||||
if homework.homework_type == 4
|
||||
myshixun = Myshixun.find work.myshixun_id
|
||||
link_to "继续实战", myshixun_game_path(myshixun.current_task, :myshixun_id => myshixun), :class => "task-btn task-btn-blue fr mr10",:target => "_blank" if myshixun
|
||||
link_to "继续实战", myshixun_game_path(myshixun.current_task, :myshixun_id => myshixun), :class => "task-btn task-btn-blue fr mr10 mt8",:target => "_blank" if myshixun
|
||||
else
|
||||
work_ids = "(" + homework.student_works.has_committed.map(&:id).join(",") + ")"
|
||||
if homework.homework_detail_manual && homework.homework_detail_manual.comment_status == 3 && User.current.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count > 0 #匿评作业,且作业状态不是在开启匿评之前
|
||||
link_to "匿评作品", student_work_index_url_in_org(homework.id, 2), :class => 'task-btn task-btn-blue fr', :title => "开启匿评后不可修改作品"
|
||||
link_to "匿评作品", student_work_index_url_in_org(homework.id, 2), :class => 'task-btn task-btn-blue fr mr10 mt8', :title => "开启匿评后不可修改作品"
|
||||
elsif homework.homework_detail_manual && homework.homework_detail_manual.comment_status > 3
|
||||
link_to "查看作品", student_work_path(work), :class => 'task-btn task-btn-blue fr', :title => "匿评已结束"
|
||||
link_to "查看作品", student_work_path(work), :class => 'task-btn task-btn-blue fr mr10 mt8', :title => "匿评已结束"
|
||||
elsif homework.end_time >= Time.now && work.user_id == User.current.id
|
||||
link_to "修改作品", edit_student_work_url_without_domain(work.id),:class => 'task-btn task-btn-blue fr'
|
||||
link_to "修改作品", edit_student_work_url_without_domain(work.id),:class => 'task-btn task-btn-blue fr mr10 mt8'
|
||||
else
|
||||
link_to "查看作品", student_work_path(work), :class => 'task-btn task-btn-blue fr mt8 mr15', :title => "作业截止后不可修改作品"
|
||||
link_to "查看作品", student_work_path(work), :class => 'task-btn task-btn-blue fr mr10 mt8', :title => "作业截止后不可修改作品"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@
|
|||
<% else %>
|
||||
<%= user_work_status @homework %>
|
||||
<% if @homework.homework_type == 4 && !@homework.student_works.where(:user_id => User.current.id, :work_status => 0).blank? %>
|
||||
<%= link_to "开始实战", shixun_path(@homework.homework_commons_shixuns.shixun),:class => 'task-btn task-btn-blue fr mr10',:target => "_blank" %>
|
||||
<%= link_to "开始实战", shixun_path(@homework.homework_commons_shixuns.shixun),:class => 'task-btn task-btn-blue fr mr10 mt8',:target => "_blank" %>
|
||||
<% end %>
|
||||
<%= link_to "查看设置", setting_homework_common_path(@homework), :class => 'edu-btn fr mr10 mt8' %>
|
||||
<% end %>
|
||||
|
|
@ -265,9 +265,9 @@
|
|||
<%# if @homework.homework_detail_manual.comment_status < 3 %>
|
||||
<%#= user_work_status @homework %>
|
||||
<%# end %>
|
||||
<% if @homework.homework_type == 4 && !@homework.student_works.where(:user_id => User.current.id, :work_status => 0).blank? %>
|
||||
<%= link_to "开始实战", shixun_path(@homework.homework_commons_shixuns.shixun),:class => 'task-btn task-btn-blue fr mr10',:target => "_blank" %>
|
||||
<% end %>
|
||||
<%# if @homework.homework_type == 4 && !@homework.student_works.where(:user_id => User.current.id, :work_status => 0).blank? %>
|
||||
<%#= link_to "开始实战", shixun_path(@homework.homework_commons_shixuns.shixun),:class => 'task-btn task-btn-blue fr mr10',:target => "_blank" %>
|
||||
<%# end %>
|
||||
<% end %>
|
||||
|
||||
<p class="color-grey font-12 clearfix mb15">
|
||||
|
|
|
|||
Loading…
Reference in New Issue