59 lines
3.9 KiB
Plaintext
59 lines
3.9 KiB
Plaintext
<% unless contributor_course_scor(course.id).count == 0 %>
|
|
<ul class="rankList">
|
|
<h4>课程活跃度
|
|
<a class="contributor_course" onmouseover ="message_titile_show2($(this),event)" onmouseout ="message_titile_hide2($(this))" style="cursor: pointer; position:relative;">积分规则</a>
|
|
</h4>
|
|
<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 => "35", :height => "35", :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="c_green" style="cursor:pointer">
|
|
<a onmouseover ="message_titile_show($(this),event)" onmouseout ="message_titile_hide($(this))" class="c_green">
|
|
<%=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>
|
|
<% end %> |