修改英雄版为0显示的问题
This commit is contained in:
parent
aefab8abf3
commit
582a7c47a4
|
@ -240,11 +240,11 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% hero_homework_scores = hero_homework_score(@course, "desc") %>
|
<% hero_homework_scores = hero_homework_score(@course, "desc") %>
|
||||||
<% unless hero_homework_scores.map(&:score).detect{|s| s != nil}.nil? %>
|
<% unless hero_homework_scores.map(&:score).detect{|s| s.to_i != 0}.nil? %>
|
||||||
<ul class="rankList">
|
<ul class="rankList">
|
||||||
<h4>课程英雄榜</h4>
|
<h4>课程英雄榜</h4>
|
||||||
<% hero_homework_scores.each do |student_score| %>
|
<% hero_homework_scores.each do |student_score| %>
|
||||||
<% unless student_score.score.nil? %>
|
<% if student_score.score.to_i != 0 %>
|
||||||
<li> <a href="javascript:void:(0);"><%=link_to image_tag(url_to_avatar(student_score.user), :width => "35", :height => "35", :class=> "rankPortrait"),user_path(student_score.user) %></a>
|
<li> <a href="javascript:void:(0);"><%=link_to image_tag(url_to_avatar(student_score.user), :width => "35", :height => "35", :class=> "rankPortrait"),user_path(student_score.user) %></a>
|
||||||
<p><a href="javascript:void:(0);"><%=link_to student_score.user, user_path(student_score.user), :title => student_score.user %></a></p>
|
<p><a href="javascript:void:(0);"><%=link_to student_score.user, user_path(student_score.user), :title => student_score.user %></a></p>
|
||||||
<p><span class="c_red" style="cursor:pointer" title="作业总分:<%= student_score.score %>"><%= student_score.score.to_i %></span></p>
|
<p><span class="c_red" style="cursor:pointer" title="作业总分:<%= student_score.score %>"><%= student_score.score.to_i %></span></p>
|
||||||
|
|
Loading…
Reference in New Issue