From 57dfad17998b23c4c6d9a61c4db91e6b42f7fa98 Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 8 Mar 2019 09:41:24 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/student_work_helper.rb | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/app/helpers/student_work_helper.rb b/app/helpers/student_work_helper.rb index 8d6265c6..f872a16b 100644 --- a/app/helpers/student_work_helper.rb +++ b/app/helpers/student_work_helper.rb @@ -173,12 +173,13 @@ module StudentWorkHelper elsif work if homework.homework_type == 4 myshixun = Myshixun.find work.myshixun_id - 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 => "white-btn orange-btn fr mr10 mt8", :target => "_blank" - elsif myshixun - link_to "继续实战", 'javascript:void(0);', :onclick => "sure_box_redirect('#{myshixun_reset_myshixun_path(myshixun)}', '实训已经更新啦,系统正在为您重置');", :class => "white-btn orange-btn fr mr10 mt8" - 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 => "white-btn orange-btn fr mr10 mt8", :target => "_blank" + # if myshixun && is_modify.blank? + # link_to "继续实战", myshixun_game_path(myshixun.current_task, :myshixun_id => myshixun), :class => "white-btn orange-btn fr mr10 mt8", :target => "_blank" + # elsif myshixun + # link_to "继续实战", 'javascript:void(0);', :onclick => "sure_box_redirect('#{myshixun_reset_myshixun_path(myshixun)}', '实训已经更新啦,系统正在为您重置');", :class => "white-btn orange-btn fr mr10 mt8" + # end else if setting_time.end_time >= Time.now link_to "修改作品", edit_student_work_url_without_domain(work.id), :class => 'white-btn orange-btn fr mr10 mt8'