2016-03-21 16:50:24 +08:00
|
|
|
<% hero_homework_scores = hero_homework_score(course, "desc") %>
|
|
|
|
<% unless hero_homework_scores.map(&:score).detect{|s| s.to_i != 0}.nil? %>
|
|
|
|
<ul class="rankList">
|
2016-06-01 14:58:59 +08:00
|
|
|
<h4>
|
|
|
|
<% if (User.current.logged? && course.open_student == 1) || (User.current.member_of_course?(course)) || User.current.admin? %>
|
|
|
|
<%= link_to "课程英雄榜", course_member_path(course, :role => 2), :class => '' %>
|
|
|
|
<% else %>
|
|
|
|
<span>课程英雄榜</span>
|
|
|
|
<% end %>
|
2016-03-21 16:50:24 +08:00
|
|
|
<a class="contributor_course" onmouseover ="message_titile_show2($(this),event)" onmouseout ="message_titile_hide2($(this))" style="cursor:pointer;">积分规则</a></h4>
|
|
|
|
<div style="cursor:pointer;" class="numIntro undis">
|
|
|
|
<div class="hero-degree-rule">积分规则<br/>
|
|
|
|
英雄榜的得分是每个同学作业的得分总和
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<% hero_homework_scores.each do |student_score| %>
|
|
|
|
<% 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>
|
|
|
|
<p><a href="javascript:void:(0);"><%=link_to student_score.user.show_name, user_path(student_score.user), :title => student_score.user.show_name %></a></p>
|
|
|
|
<p><span class="c_red" style="cursor:pointer" ><%= student_score.score<0 ? 0 : student_score.score.to_i %></span></p>
|
|
|
|
</li>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<div class="cl"></div>
|
|
|
|
</ul>
|
|
|
|
<% end %>
|