diff --git a/app/views/homework_common/index.html.erb b/app/views/homework_common/index.html.erb
index 6847da2c7..4a804ae60 100644
--- a/app/views/homework_common/index.html.erb
+++ b/app/views/homework_common/index.html.erb
@@ -48,30 +48,32 @@
- <% if homework.homework_type == 2 && homework.homework_detail_programing && @is_teacher%>
-
-
- ">
-
- 输入
- |
-
- 输出
- |
-
- <% homework.homework_tests.each do |test|%>
+ <% if homework.homework_type == 2 && homework.homework_detail_programing%>
+ <% if @is_teacher%>
+
+
">
- <%=test.input%>
+ 输入
|
- <%= test.output%>
+ 输出
|
- <% end%>
-
-
-
+ <% homework.homework_tests.each do |test|%>
+ ">
+
+ <%=test.input%>
+ |
+
+ <%= test.output%>
+ |
+
+ <% end%>
+
+
+
+ <% end%>
开发语言:
diff --git a/app/views/student_work/index.html.erb b/app/views/student_work/index.html.erb
index 92f6f93e0..3783d67d3 100644
--- a/app/views/student_work/index.html.erb
+++ b/app/views/student_work/index.html.erb
@@ -137,29 +137,31 @@
<% if @homework.homework_type == 2 && @homework.homework_detail_programing%>
-
-
- ">
-
- 输入
- |
-
- 输出
- |
-
- <% @homework.homework_tests.each do |test|%>
+ <% if @is_teacher%>
+
+
">
- <%=test.input%>
+ 输入
|
- <%= test.output%>
+ 输出
|
- <% end%>
-
-
-
+ <% homework.homework_tests.each do |test|%>
+ ">
+
+ <%=test.input%>
+ |
+
+ <%= test.output%>
+ |
+
+ <% end%>
+
+
+
+ <% end%>
开发语言: