68 lines
4.3 KiB
Plaintext
68 lines
4.3 KiB
Plaintext
<% unless contributor_course_scor(course.id).count == 0 %>
|
|
<div>
|
|
<ul class="rankList">
|
|
<h3 style="font-size: 14px; font-weight: normal;">
|
|
<% 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, :sort_type => 'act_score'), :class => 'sy_cblack' %>
|
|
<% else %>
|
|
班级活跃度
|
|
<% end %>
|
|
<a class="sy_cmore fr" onmouseover ="message_titile_show2($(this),event)" onmouseout ="message_titile_hide2($(this))" style="cursor: pointer; position:relative;">积分规则</a>
|
|
<div class="cl"></div>
|
|
</h3>
|
|
<div class="numIntro undis" style="cursor:pointer;">
|
|
<div class="active-degree-rule">
|
|
积分规则<br/>
|
|
资源发布:资源数 x 5 <br/>
|
|
问答发布:发帖数 x 2 <br/>
|
|
通知发布:通知数 x 1 <br/>
|
|
问答回复:回复数 x 1 <br/>
|
|
作业留言:留言数 x 1 <br/>
|
|
通知留言:留言数 x 1 <br/>
|
|
班级留言:留言数 x 1 <br/>
|
|
总得分为以上得分之和</div>
|
|
</div>
|
|
<% contributor_course_scor(course.id).each do |contributor_score| %>
|
|
<% total_score = contributor_score.resource_num.to_i * 5 + contributor_score.message_num.to_i * 2 +
|
|
contributor_score.message_reply_num.to_i * 1 + contributor_score.journal_num.to_i * 1 +
|
|
+ contributor_score.homework_journal_num.to_i * 1 + contributor_score.news_reply_num.to_i * 1 +
|
|
contributor_score.news_num.to_i * 1 %>
|
|
<% unless total_score ==0 %>
|
|
<li>
|
|
<%=link_to image_tag(url_to_avatar(contributor_score.user), :width => "50", :height => "50", :class=> "rankPortrait"),user_path(contributor_score.user) %>
|
|
<p><%=link_to contributor_score.user.show_name, user_path(contributor_score.user.id), :title => contributor_score.user.show_name %></p>
|
|
<p><span class="sy_corange" style="cursor:pointer">
|
|
<a onmouseover ="message_titile_show($(this),event)" onmouseout ="message_titile_hide($(this))" class="sy_corange">
|
|
<%=total_score %></a></span></p>
|
|
<div style="display: none" class="numIntro">
|
|
<div class="contributor-course-calculate">积分计算</div>
|
|
<%# unless contributor_score.resource_num.to_i == 0 %>
|
|
<div style="padding-left: 2px;padding-bottom: 2px;padding-right: 2px">
|
|
资源发布数 x 5 = <%= contributor_score.resource_num.to_i %> x 5 = <%= contributor_score.resource_num.to_i * 5 %></br>
|
|
<%# end %>
|
|
<%# unless contributor_score.message_num.to_i == 0 %>
|
|
问答发布数 x 2 = <%= contributor_score.message_num.to_i %> x 2 = <%= contributor_score.message_num.to_i * 2 %></br>
|
|
通知发布数 x 1 = <%= contributor_score.news_num.to_i %> x 1 = <%= contributor_score.news_num.to_i %></br>
|
|
<%# end %>
|
|
<%# unless contributor_score.message_reply_num.to_i == 0 %>
|
|
问答回帖数 x 1 = <%= contributor_score.message_reply_num.to_i %> x 1 = <%= contributor_score.message_reply_num.to_i %></br>
|
|
作业留言数 x 1 = <%= contributor_score.homework_journal_num.to_i %> x 1 = <%= contributor_score.homework_journal_num.to_i %></br>
|
|
通知留言数 x 1 = <%= contributor_score.news_reply_num.to_i %> x 1 = <%= contributor_score.news_reply_num.to_i %></br>
|
|
<%# end %>
|
|
<%# unless contributor_score.journal_num.to_i == 0 %>
|
|
班级留言数 x 1 = <%= contributor_score.journal_num.to_i %> x 1 = <%= contributor_score.journal_num.to_i %></br>
|
|
<%# end %>
|
|
<%# unless contributor_score.homework_journal_num.to_i == 0 %>
|
|
<%# end %>
|
|
<%# unless contributor_score.news_reply_num.to_i == 0 %>
|
|
<%# end %>
|
|
总得分:<%=total_score %>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<% end %>
|
|
<% end %>
|
|
<div class="cl"></div>
|
|
</ul>
|
|
</div>
|
|
<% end %> |