diff --git a/app/views/homework_common/index.html.erb b/app/views/homework_common/index.html.erb index db7dad9c7..2de96bca1 100644 --- a/app/views/homework_common/index.html.erb +++ b/app/views/homework_common/index.html.erb @@ -48,6 +48,32 @@
+ <% if homework.homework_type == 2 && homework.homework_detail_programing%> + + + "> + + + + <% homework.homework_tests.each do |test|%> + "> + + + + <% end%> + +
+ 输入 + + 输出 +
+ <%=test.input%> + + <%= test.output%> +
+ <% end%> +
+
<% unless homework.attachments.empty?%> 附件: diff --git a/app/views/student_work/index.html.erb b/app/views/student_work/index.html.erb index b9148a88f..1eaee54af 100644 --- a/app/views/student_work/index.html.erb +++ b/app/views/student_work/index.html.erb @@ -127,13 +127,31 @@ <%= student_anonymous_comment @homework %> <%= student_new_homework @homework %> <% end %> -
+
<%= @homework.description.html_safe %>
+
+ <% if @homework.homework_type == 2 && @homework.homework_detail_programing%> + + + <% @homework.homework_tests.each do |test|%> + "> + + + + <% end%> + +
+ <%=test.input%> + + <%= test.output%> +
+ <% end%>
+
<% unless @homework.attachments.empty?%> 附件: