diff --git a/app/views/homework_common/index.html.erb b/app/views/homework_common/index.html.erb index 694069b44..a39f93671 100644 --- a/app/views/homework_common/index.html.erb +++ b/app/views/homework_common/index.html.erb @@ -25,8 +25,8 @@ ( <%= link_to homework.student_works.count, student_work_index_path(:homework => homework.id), :class => 'c_red'%> )

<% if @is_teacher%> - <%= homework_anonymous_comment(homework)%> - <%= link_to(l(:label_bid_respond_delete), homework_common_path(homework),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "fr mr10 work_edit") %> + <%#= homework_anonymous_comment(homework)%> + <%#= link_to(l(:label_bid_respond_delete), homework_common_path(homework),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "fr mr10 work_edit") %> <%#= link_to(l(:button_edit),edit_homework_common_path(homework), :class => "fr mr10 work_edit") %> <% elsif @is_student%> <%= student_anonymous_comment homework %> diff --git a/app/views/student_work/_programing_work_show.html.erb b/app/views/student_work/_programing_work_show.html.erb index b259e20a5..10e1870ef 100644 --- a/app/views/student_work/_programing_work_show.html.erb +++ b/app/views/student_work/_programing_work_show.html.erb @@ -25,40 +25,44 @@ <% if @is_teacher%> -
  • 测试结果: - - - - - - - - <%@homework.homework_tests.each do |test|%> - "> - - - <% student_work_test = StudentWorkTest.where(:homework_test_id => test.id,:student_work_id => @work.id).first%> - - - - <% end%> - <% student_work_test = @work.student_work_test.first%> - <% if student_work_test && student_work_test.error_msg && !student_work_test.error_msg.empty?%> - - - - <% end%> - - -
    输入输出测试结果
    <%= student_work_test.nil? ? "正在编译" : student_work_test.status_to_s%>
    - <%= student_work_test.error_msg%> -
    -
    +
  • + + 测试结果: + +
    + <% @work.student_work_tests.each_with_index do |test, index| %> +
    +

    第<%= @work.student_work_tests.count - index%>次测试

    <%= test.created_at.to_s(:db) %> +
    +
    + <% if test.status.to_i == -2 %> +
    <%= test.results.first %>
    + <% else %> +
    +
      + <% test.results.each_with_index do |x, i| %> +
    • + 测试<%=i+1%> + <% if x["status"].to_i != 0 %> + 测试错误! + 您的输出: + <%=x["result"]%> + 正确输出: + <%=x["output"]%> +
      + <% else %> + 测试正确! +
      + <% end %> +
    • + <% end %> +
    +
    + <% end %> + <% end %> +
  • +
    <%= render :partial => 'add_score',:locals => {:work => @work,:score => @score}%> diff --git a/app/views/student_work/index.html.erb b/app/views/student_work/index.html.erb index e8fa33902..d128eab67 100644 --- a/app/views/student_work/index.html.erb +++ b/app/views/student_work/index.html.erb @@ -123,7 +123,7 @@ <%= @homework.name%> <% if @is_teacher%> - <%= homework_anonymous_comment(@homework)%> + <%#= homework_anonymous_comment(@homework)%> <% else%> <%= student_anonymous_comment @homework %> <%= student_new_homework @homework %>