From 69ab80bf9ee2a2f81833efdcff5fc86e05e9c19e Mon Sep 17 00:00:00 2001 From: huang Date: Sat, 3 Dec 2016 11:20:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E4=BA=8E=E8=AE=BE=E7=BD=AE=E4=BA=86?= =?UTF-8?q?=E4=BB=85=E5=AF=B9=E8=87=AA=E5=B7=B1=E6=98=BE=E7=A4=BA=E7=9A=84?= =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E8=AF=BE=E7=A8=8B=E8=8B=B1=E9=9B=84=E6=A6=9C?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/courses/_course_heroes.html.erb | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/app/views/courses/_course_heroes.html.erb b/app/views/courses/_course_heroes.html.erb index bd285f9b0..b6bf0daa0 100644 --- a/app/views/courses/_course_heroes.html.erb +++ b/app/views/courses/_course_heroes.html.erb @@ -15,9 +15,15 @@ <% hero_homework_scores.each do |student_score| %> <% if student_score.score.to_i != 0 %> -
  • <%=link_to image_tag(url_to_avatar(student_score.user), :width => "35", :height => "35", :class=> "rankPortrait"),user_path(student_score.user) %> -

    <%=link_to student_score.user.show_name, user_path(student_score.user), :title => student_score.user.show_name %>

    -

    <%= student_score.score<0 ? 0 : student_score.score.to_i %>

    +
  • <%=link_to image_tag(url_to_avatar(student_score.user), :width => "35", :height => "35", :class=> "rankPortrait"),user_path(student_score.user) %> +

    <%=link_to student_score.user.show_name, user_path(student_score.user), :title => student_score.user.show_name %>

    +

    + <% if !(User.current.allowed_to?(:as_teacher, @course) || User.current.admin?) && User.current.id != student_score.user.id && course_has_score_open_common_homework(@course) %> + <%= "**" %> + <% else %> + <%= student_score.score<0 ? 0 : student_score.score.to_i %> + <% end %> +

  • <% end %> <% end %>