From 821ade7985401ba8dc43cb40d2b74b5612e02654 Mon Sep 17 00:00:00 2001 From: Tim Date: Tue, 26 Jan 2016 11:00:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E5=88=97=E8=A1=A8=E4=BC=98?= =?UTF-8?q?=E5=8C=96=EF=BC=8C=E8=AF=BE=E7=A8=8B=E5=8A=A0=E5=85=A5=E9=80=80?= =?UTF-8?q?=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/_project_info.html.erb | 4 +- .../_programing_work_show.html.erb | 279 +++++++++--------- app/views/student_work/_show.html.erb | 277 ++++++++--------- .../_work_attachments_status.html.erb | 2 +- 4 files changed, 282 insertions(+), 280 deletions(-) diff --git a/app/views/layouts/_project_info.html.erb b/app/views/layouts/_project_info.html.erb index 60fc6f96d..98670dba0 100644 --- a/app/views/layouts/_project_info.html.erb +++ b/app/views/layouts/_project_info.html.erb @@ -9,13 +9,13 @@ <%= image_tag(url_to_avatar(@course), :width => "60", :height => "60") %> -
<%= @course.is_public == 0 ? "私有课程" : "公开课程" %> +
ID:<%= @course.id%><%= @course.is_public == 0 ? "(私有)" : "(公开)" %> <% if @course.id == 370 %> 精品课程 <% end %>
-ID:<%= @course.id%> +加入课程
-
  • - <%= link_to("", student_work_path(work),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "pic_del") %> -
  • -
  • - <%= link_to "",new_student_work_path(:homework => @homework.id),:class => "pic_edit"%> -
  • - <% end%> - <% if @homework.homework_detail_manual.comment_status == 3 && work.user != User.current%> - -
  • - <%= render :partial => 'student_work_praise' %> -
  • - <% end%> -
    - -
  • - 编程代码: -
    -
    -
    -
    -
  • - -
  • - - 测试结果: - -
    - <% 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 %> -
    -
  • - -
  • - <% if @is_teacher || (@homework.homework_detail_manual.comment_status == 2 && work.user != User.current )%> - -
    - <%= render :partial => 'add_score',:locals => {:work => work,:score => score}%> -
    - <% end%> -
    -
  • - - -
    - <%= render :partial => 'student_work/revise_attachment', :locals => {:work => work} %> -
    -
    - -
    - <%student_work_scores.each do |student_score|%> -
    - <%= render :partial => 'student_work_score',:locals => {:score => student_score,:is_last => student_score == student_work_scores.last}%> -
    - <% end%> -
    - - 收起 -
    -
    - +
    +
    + + +
    + <%= render :partial => 'student_work/revise_attachment', :locals => {:work => work} %> +
    +
    + +
    + <%student_work_scores.each do |student_score|%> +
    + <%= render :partial => 'student_work_score',:locals => {:score => student_score,:is_last => student_score == student_work_scores.last}%> +
    + <% end%> +
    +
    + + 收起 +
    +
    + diff --git a/app/views/student_work/_show.html.erb b/app/views/student_work/_show.html.erb index 662ddece4..d66a30718 100644 --- a/app/views/student_work/_show.html.erb +++ b/app/views/student_work/_show.html.erb @@ -1,139 +1,140 @@ -
    -
    - <% is_teacher = User.current.allowed_to?(:as_teacher, @homework.course) || User.current.admin? %> - <% if @homework.homework_type != 3 %> - <% is_my_work = work.user == User.current%> - <% else %> - <% pro = @homework.student_work_projects.where(:user_id => User.current.id).first %> - <% is_my_work = pro && pro.student_work_id == work.id%> - <% end %> - - -
    - <%= render :partial => 'student_work/revise_attachment', :locals => {:work => work} %> -
    -
    - -
    - <%student_work_scores.each do |student_score|%> -
    - <%= render :partial => 'student_work_score',:locals => {:score => student_score,:is_last => student_score == student_work_scores.last}%> -
    - <% end%> -
    - - 收起 -
    -
    - \ No newline at end of file diff --git a/app/views/student_work/_work_attachments_status.html.erb b/app/views/student_work/_work_attachments_status.html.erb index c4b2a795e..6a8591197 100644 --- a/app/views/student_work/_work_attachments_status.html.erb +++ b/app/views/student_work/_work_attachments_status.html.erb @@ -1,7 +1,7 @@ <% attachments.each_with_index do |attachment,i| %>
    - + <%= link_to_short_attachment attachment,:length=> 58, :class => 'hidden link_file_a fl newsBlue mw360', :download => true -%>