diff --git a/app/views/users/_course_homework.html.erb b/app/views/users/_course_homework.html.erb index 03507d8c..5f521117 100644 --- a/app/views/users/_course_homework.html.erb +++ b/app/views/users/_course_homework.html.erb @@ -83,7 +83,10 @@ <% elsif work.present? %> <% myshixun = Myshixun.where(:id => work.myshixun_id).first %> <%# is_modify = ShixunModify.where(:myshixun_id => myshixun.try(:id), :shixun_id => myshixun.shixun.try(:id), :status => 1).first %> - <%= link_to "继续实战", shixun_path(myshixun.shixun), :class => "edu-filter-btn edu-activity-blue ml15 fl mt5", :target => "_blank" %> + <% if myshixun.present? %> + <%= link_to "继续实战", shixun_path(myshixun.shixun), :class => "edu-filter-btn edu-activity-blue ml15 fl mt5", :target => "_blank" %> + <% end %> + <%# if myshixun && is_modify.blank? %> <%#= link_to "继续实战", shixun_exec_shixun_path(myshixun.shixun), :class => "edu-filter-btn edu-activity-blue ml15 fl mt5", :target => "_blank" %> <%# elsif myshixun %>