课堂继续挑战实训的链接调整

dev_SaaS
cxt 6 years ago
parent 57dfad1799
commit fa54a0be3d

@ -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

@ -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 %>
<span class="edu-filter-btn <%= homework_status_color "未开启补交" %> ml15 fl mt5">未开启补交</span>
<% end %>

Loading…
Cancel
Save