From 51245d44fa896ac7b9b10c32884502601b3b18ce Mon Sep 17 00:00:00 2001
From: yuanke <249218296@qq.com>
Date: Wed, 27 Apr 2016 10:02:43 +0800
Subject: [PATCH] =?UTF-8?q?=E7=BC=96=E7=A8=8B=E4=BD=9C=E4=B8=9A=E6=9C=AA?=
=?UTF-8?q?=E5=8F=91=E5=B8=83=E6=98=AF=20=E7=94=B1=E4=BA=8E=E4=BB=A3?=
=?UTF-8?q?=E7=A0=81=E6=9F=A5=E9=87=8D=E6=8C=89=E9=92=AE=E7=9A=84=E5=8E=9F?=
=?UTF-8?q?=E5=9B=A0=E5=AF=BC=E8=87=B4=E5=B8=83=E5=B1=80=E9=97=AE=E9=A2=98?=
=?UTF-8?q?=E3=80=82?=
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 3cdcc2053..743090a4d 100644
--- a/app/views/users/_course_homework.html.erb
+++ b/app/views/users/_course_homework.html.erb
@@ -81,9 +81,11 @@
<%= link_to "模拟答题", new_user_commit_homework_users_path(homework_id: activity.id, is_test: true), class: 'c_blue test-program-btn', title: '教师可以通过模拟答题设置作业的标准答案' %>
-
- <%= link_to "代码查重", work_canrepeat_student_work_index_path(homework: activity.id, course_id: activity.course.id), class: 'c_blue test-program-btn',:remote => true %>
-
+ <% if activity.homework_detail_manual.comment_status != 0 %>
+
+ <%= link_to "代码查重", work_canrepeat_student_work_index_path(homework: activity.id, course_id: activity.course.id), class: 'c_blue test-program-btn',:remote => true %>
+
+ <% end %>
<% end %>
<% if activity.homework_type == 2%>
diff --git a/app/views/users/_user_homework_detail.html.erb b/app/views/users/_user_homework_detail.html.erb
index 5d443af48..4bab8d98f 100644
--- a/app/views/users/_user_homework_detail.html.erb
+++ b/app/views/users/_user_homework_detail.html.erb
@@ -80,9 +80,11 @@
<%= link_to "模拟答题", new_user_commit_homework_users_path(homework_id: homework_common.id, is_test: true), class: 'c_blue test-program-btn', title: '教师可以通过模拟答题设置作业的标准答案' %>
-
- <%= 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 %>
-
+ <% if homework_common.homework_detail_manual.comment_status != 0 %>
+
+ <%= 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 %>
+
+ <% end %>
<% end %>
<% if homework_common.homework_type == 2%>