2017-01-20 10:16:51 +08:00
|
|
|
|
<div class="sy_class_r ml10">
|
2017-02-10 14:35:43 +08:00
|
|
|
|
<h3 class="game-setting-h3"><span class="ml15"></span>统计</h3>
|
|
|
|
|
<div class="game-setting-tab">
|
|
|
|
|
<ul id="game-setting-tab-nav">
|
|
|
|
|
<li id="game-setting-tab-nav-1" onclick="HoverLi(1);">
|
|
|
|
|
<a href="javascript:void(0);" >活跃度</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li id="game-setting-tab-nav-2" onclick="HoverLi(2);">
|
|
|
|
|
<a href="javascript:void(0);" >英雄榜</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li id="game-setting-tab-nav-3" onclick="HoverLi(3);">
|
|
|
|
|
<a href="javascript:void(0);" >项目活跃度</a>
|
|
|
|
|
</li>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</ul>
|
|
|
|
|
<div id="game-setting-content-1" class="undis">
|
|
|
|
|
<div class="alert alert-blue mt10 ml10 mr10 mb10" style="width: 703px;">
|
|
|
|
|
活跃度总分 = 资源发布数 * 权值(5分) + 发帖数 * 权值(2分) + 帖子回复数 * 权值(1分) + 通知发布数 * 权值(1分) + <br/>通知回复数 * 权值(1分) + 作业回复数 * 权值(1分) + 班级留言数 * 权值(1分)
|
|
|
|
|
</div>
|
|
|
|
|
<div class="clear ml10 mr10" id="act_table_<%=@course.id %>">
|
|
|
|
|
<% if @tab.nil? || @tab == 1 %>
|
|
|
|
|
<%=render :partial => 'act_table' %>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div><!--issues_list_content_1 end-->
|
|
|
|
|
|
|
|
|
|
<div id="game-setting-content-2" class="undis">
|
|
|
|
|
<div class="alert alert-blue mt10 ml10 mr10 mb10" style="width: 703px;">
|
|
|
|
|
每个同学作业的得分总和
|
|
|
|
|
</div>
|
|
|
|
|
<div class="clear ml10 mr10" id="hero_table_<%=@course.id %>">
|
|
|
|
|
<% if @tab == 2 %>
|
|
|
|
|
<%=render :partial => 'hero_table' %>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div><!--issues_list_content_2 end-->
|
|
|
|
|
<div id="game-setting-content-3" class="undis">
|
|
|
|
|
<div class="alert alert-blue mt10 ml10 mr10 mb10" style="width: 703px;">
|
|
|
|
|
项目活跃度 = 发布资源数 * 权值(5分) + 代码提交数 * 权值(4分) + 发布Issue数 * 权值(4分) + Issue回复数 * 权值(1分) + <br/>发布帖子数 * 权值(2分) + 回复帖子数 * 权值(1分)
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class=" clear ml10 mr10" >
|
2017-02-14 15:07:38 +08:00
|
|
|
|
<div class="mb10 clear">
|
|
|
|
|
<label class=" fl mt5 c_grey02"> 选择作业 : </label>
|
|
|
|
|
<% homeworks = select_group_homeworks @course %>
|
|
|
|
|
<% is_teacher = User.current.allowed_to?(:as_teacher,@course) || User.current.admin? %>
|
|
|
|
|
<select id="homework_select" class=" fl newupload_select w150" onchange="select_homework_projects();" style="width:150px; height:30px; background:#fff;">
|
|
|
|
|
<option value="0">全部</option>
|
|
|
|
|
<% homeworks.each do |homework| %>
|
|
|
|
|
<option value="<%= homework.id %>">作业<%= (get_hw_index(homework, is_teacher) + 1)%>:<%= homework.name %></option>
|
|
|
|
|
<% end %>
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
2017-02-10 14:35:43 +08:00
|
|
|
|
|
|
|
|
|
<div id="project_table_<%=@course.id %>">
|
|
|
|
|
<% if @tab == 3 %>
|
|
|
|
|
<%=render :partial => 'project_table' %>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div><!--issues_list_content_3 end-->
|
|
|
|
|
</div><!--issues_con_list end-->
|
|
|
|
|
</div><!--sy_class_r end-->
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
$(function(){
|
|
|
|
|
<% if @tab.nil? %>
|
|
|
|
|
g('game-setting-content-1').className='dis';
|
|
|
|
|
g('game-setting-tab-nav-1').className='game-setting-nav-hover';
|
|
|
|
|
<% else %>
|
|
|
|
|
g('game-setting-content-<%= @tab %>').className='dis';
|
|
|
|
|
g('game-setting-tab-nav-<%= @tab %>').className='game-setting-nav-hover';
|
|
|
|
|
<% end %>
|
2017-02-14 15:07:38 +08:00
|
|
|
|
<% if @homework_id != 0 %>
|
|
|
|
|
$("#homework_select option[value='<%= @homework_id %>']").attr("selected",true);
|
|
|
|
|
<% end %>
|
2017-02-10 14:35:43 +08:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
function g(o){
|
|
|
|
|
return document.getElementById(o);
|
|
|
|
|
}
|
|
|
|
|
function HoverLi(n){
|
|
|
|
|
for(var i=1;i<=3;i++){
|
|
|
|
|
g('game-setting-tab-nav-'+i).className='';
|
|
|
|
|
g('game-setting-content-'+i).className='undis';
|
|
|
|
|
}
|
|
|
|
|
g('game-setting-content-'+n).className='dis';
|
|
|
|
|
g('game-setting-tab-nav-'+n).className='game-setting-nav-hover';
|
2017-02-14 15:07:38 +08:00
|
|
|
|
if(n == 3){
|
|
|
|
|
$("#homework_select option[value='0']").attr("selected",true);
|
|
|
|
|
}
|
|
|
|
|
$.get('<%= course_statistics_course_path(@course) %>'+'?tab='+n);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function select_homework_projects(){
|
|
|
|
|
$.get('<%= course_statistics_course_path(@course) %>'+'?tab=3&homework_id='+$("#homework_select").val());
|
2017-02-10 14:35:43 +08:00
|
|
|
|
}
|
|
|
|
|
</script>
|