From 639749f02b6456e90efa83ca7efc8e35ee8a80db Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Mon, 25 Apr 2016 11:00:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BD=9C=E4=B8=9A=E6=9C=AA?= =?UTF-8?q?=E5=8F=91=E5=B8=83=E6=97=B6=20=E5=8A=A0=E4=BA=86=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E6=9F=A5=E9=87=8D=E6=8C=89=E9=92=AE=20=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E9=94=99=E4=B9=B1=E7=9A=84=E9=97=AE=E9=A2=98.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_course_homework.html.erb | 8 +++++--- app/views/users/_user_homework_detail.html.erb | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/app/views/users/_course_homework.html.erb b/app/views/users/_course_homework.html.erb index 351001bb8..12b93f40d 100644 --- a/app/views/users/_course_homework.html.erb +++ b/app/views/users/_course_homework.html.erb @@ -76,9 +76,11 @@ <div class="homepagePostSubmit"> <%= link_to "模拟答题", new_user_commit_homework_users_path(homework_id: activity.id, is_test: true), class: 'c_blue test-program-btn', title: '教师可以通过模拟答题设置作业的标准答案' %> </div> - <div class="homepagePostSubmit"> - <%= link_to "代码查重", work_canrepeat_student_work_index_path(homework: activity.id, course_id: activity.course.id), class: 'c_blue test-program-btn',:remote => true %> - </div> + <% if activity.homework_detail_manual.comment_status != 0 %> + <div class="homepagePostSubmit"> + <%= link_to "代码查重", work_canrepeat_student_work_index_path(homework: activity.id, course_id: activity.course.id), class: 'c_blue test-program-btn',:remote => true %> + </div> + <% end %> <% end %> <% if activity.homework_type == 2%> <div class="homepagePostDeadline mr15"> diff --git a/app/views/users/_user_homework_detail.html.erb b/app/views/users/_user_homework_detail.html.erb index e483f3daf..bc73bcfb6 100644 --- a/app/views/users/_user_homework_detail.html.erb +++ b/app/views/users/_user_homework_detail.html.erb @@ -74,9 +74,11 @@ <div class="homepagePostSubmit"> <%= link_to "模拟答题", new_user_commit_homework_users_path(homework_id: homework_common.id, is_test: true), class: 'c_blue test-program-btn', title: '教师可以通过模拟答题设置作业的标准答案' %> </div> - <div class="homepagePostSubmit"> - <%= link_to "代码查重", work_canrepeat_student_work_index_path(homework: homework_common.id, course_id: homework_common.course_id), class: 'c_blue test-program-btn',:remote => true %> - </div> + <% if homework_common.homework_detail_manual.comment_status != 0 %> + <div class="homepagePostSubmit"> + <%= link_to "代码查重", work_canrepeat_student_work_index_path(homework: homework_common.id, course_id: homework_common.course_id), class: 'c_blue test-program-btn',:remote => true %> + </div> + <% end %> <% end %> <% if homework_common.homework_type == 2%> <div class="homepagePostDeadline mr15">