diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index b4b156a0..f00bf2b9 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -5016,12 +5016,13 @@ module ApplicationHelper link_to "开始实战", shixun_path(homework.homework_commons_shixuns.shixun), :class => 'edu-default-btn user_bluebg_btn fr mr20 pl7 pr7',:target => "_blank" else 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 - if myshixun && is_modify.blank? - link_to "继续实战", myshixun_game_path(myshixun.current_task, :myshixun_id => myshixun), :class => "edu-default-btn user_orangebg_btn fr mr20 pl7 pr7", :target => "_blank" - elsif myshixun - link_to "继续实战", 'javascript:void(0);', :onclick => "sure_box_redirect('#{myshixun_reset_myshixun_path(myshixun)}', '实训已经更新啦,系统正在为您重置');", :class => "edu-default-btn user_orangebg_btn fr mr20 pl7 pr7" - end + # is_modify = ShixunModify.where(:myshixun_id => myshixun.try(:id), :shixun_id => myshixun.shixun.try(:id), :status => 1).first + link_to "继续实战", shixun_exec_shixun_path(myshixun.shixun), :class => "edu-default-btn user_orangebg_btn fr mr20 pl7 pr7", :target => "_blank" + # if myshixun && is_modify.blank? + # link_to "继续实战", myshixun_game_path(myshixun.current_task, :myshixun_id => myshixun), :class => "edu-default-btn user_orangebg_btn fr mr20 pl7 pr7", :target => "_blank" + # elsif myshixun + # link_to "继续实战", 'javascript:void(0);', :onclick => "sure_box_redirect('#{myshixun_reset_myshixun_path(myshixun)}', '实训已经更新啦,系统正在为您重置');", :class => "edu-default-btn user_orangebg_btn fr mr20 pl7 pr7" + # end end elsif work.nil? && setting_time.end_time >= Time.now if homework.homework_type ==3 && project.nil? && homework.homework_detail_group.base_on_project == 1 diff --git a/app/views/users/_course_homework.html.erb b/app/views/users/_course_homework.html.erb index 58aa90f0..3f0a4ed2 100644 --- a/app/views/users/_course_homework.html.erb +++ b/app/views/users/_course_homework.html.erb @@ -82,12 +82,13 @@ <%= link_to "开始实战", shixun_path(activity.homework_commons_shixuns.shixun), :class => 'edu-filter-btn edu-activity-blue ml15 fl mt5', :target => "_blank" %> <% 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 %> - <% if myshixun && is_modify.blank? %> - <%= link_to "继续实战", myshixun_game_path(myshixun.current_task, :myshixun_id => myshixun), :class => "edu-filter-btn edu-activity-blue ml15 fl mt5", :target => "_blank" %> - <% elsif myshixun %> - <%= link_to "继续实战", 'javascript:void(0);', :onclick => "sure_box_redirect('#{myshixun_reset_myshixun_path(myshixun)}', '实训已经更新啦,系统正在为您重置');", :class => "edu-filter-btn edu-activity-blue ml15 fl mt5" %> - <% end %> + <%# is_modify = ShixunModify.where(:myshixun_id => myshixun.try(:id), :shixun_id => myshixun.shixun.try(:id), :status => 1).first %> + <%= link_to "继续实战", shixun_exec_shixun_path(myshixun.shixun), :class => "edu-filter-btn edu-activity-blue ml15 fl mt5", :target => "_blank" %> + <%# 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 %> + <%#= link_to "继续实战", 'javascript:void(0);', :onclick => "sure_box_redirect('#{myshixun_reset_myshixun_path(myshixun)}', '实训已经更新啦,系统正在为您重置');", :class => "edu-filter-btn edu-activity-blue ml15 fl mt5" %> + <%# end %> <% else %> ml15 fl mt5">未开启补交 <% end %>