2016-06-24 15:54:56 +08:00
|
|
|
<table class="hwork-table-wrap" style="border-bottom:1px solid #eaeaea;">
|
2016-06-16 11:31:39 +08:00
|
|
|
<tr class="b_grey hworkH30">
|
|
|
|
<th class="hworkList30 pl5 pr5"><span class="c_dark f14 fb">序号</span></th>
|
|
|
|
<th class="hworkList50"> </th>
|
2016-09-09 11:09:47 +08:00
|
|
|
<th class="hworkList130"><span class="c_dark f14 fb">姓名</span></th>
|
|
|
|
<th class="hworkList130"><span class="c_dark f14 fb">学号</span></th>
|
|
|
|
<th class="hworkList130"><span class="c_dark f14 fb">班级</span></th>
|
|
|
|
<th width="60"> </th>
|
2016-05-20 15:15:42 +08:00
|
|
|
<th class="hworkList130">
|
2016-06-16 11:31:39 +08:00
|
|
|
<%= link_to "时间",'',:class => "c_dark f14 fb" ,:remote => true%>
|
2016-05-20 15:15:42 +08:00
|
|
|
</th>
|
|
|
|
<th class="hworkList50">
|
2016-06-16 11:31:39 +08:00
|
|
|
<%= link_to "成绩",'',:class => "c_dark f14 fb",:remote => true%>
|
2016-05-20 15:15:42 +08:00
|
|
|
</th>
|
|
|
|
</tr>
|
2015-11-17 15:18:07 +08:00
|
|
|
|
2016-05-24 16:37:21 +08:00
|
|
|
<% @exercise_users_list.each_with_index do |exercise, index|%>
|
2016-05-20 15:15:42 +08:00
|
|
|
<tr class="hworkListRow" id="student_work_<%= exercise.id%>">
|
2016-06-16 11:31:39 +08:00
|
|
|
<td class="pl5 pr5" style="text-align:center;"><%=index + 1 %></td>
|
2016-09-09 11:09:47 +08:00
|
|
|
<td class="hworkPortrait float-none">
|
2016-05-20 15:15:42 +08:00
|
|
|
<%= link_to(image_tag(url_to_avatar(exercise.user),:width =>"40",:height => "40",:style => "display:block;", :class => "mt15"),user_activities_path(exercise.user)) %>
|
|
|
|
</td>
|
2016-09-09 11:09:47 +08:00
|
|
|
<td class="hworkStName130 pr10 student_work_<%= exercise.id%>" title="姓名" id="student_name_<%= exercise.id%>" style="cursor:pointer;">
|
2016-05-20 15:15:42 +08:00
|
|
|
<%=exercise.user.show_name %>
|
|
|
|
</td>
|
2016-11-17 17:04:00 +08:00
|
|
|
<td class="hworkStID130 pr10 student_work_<%= exercise.id%> float-none" title="学号" id="student_id_<%= exercise.id%>" style="cursor:pointer;">
|
|
|
|
<span class="hidden fl" style="width:130px;"><%= exercise.user.user_extensions.nil? ? "--" : exercise.user.user_extensions.student_id%></span>
|
|
|
|
</td>
|
2016-09-09 11:09:47 +08:00
|
|
|
<td class="hworkStID130 student_work_<%= exercise.id%> float-none" title="班级" id="student_class_<%= exercise.id%>" style="cursor:pointer;">
|
2016-05-20 15:15:42 +08:00
|
|
|
--
|
|
|
|
</td>
|
2016-09-09 11:09:47 +08:00
|
|
|
<td width="60"> </td>
|
2016-05-24 16:37:21 +08:00
|
|
|
<td class="hworkList130 c_grey">
|
2016-05-20 15:15:42 +08:00
|
|
|
<% if exercise.created_at%>
|
|
|
|
<%= Time.parse(format_time(exercise.created_at)).strftime("%m-%d %H:%M")%>
|
2016-11-17 17:04:00 +08:00
|
|
|
<% if exercise.commit_status == 0 %>
|
2016-05-20 15:15:42 +08:00
|
|
|
<span class="c_red">[未答]</span>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</td>
|
|
|
|
<td class="hworkList50 <%= score_color exercise.score%> student_final_scor_info">
|
|
|
|
<%= exercise.score.nil? ? "--" : format("%.1f",exercise.score)%>
|
|
|
|
</td>
|
2016-05-20 20:44:13 +08:00
|
|
|
<td><div style="position:relative;"><div class="hworkTip" style="display: none" id="work_click_<%= exercise.id%>"><em></em><span></span><font class="fontGrey2">点击查看详情</font></div></div></td>
|
2016-05-20 15:15:42 +08:00
|
|
|
</tr>
|
2016-05-24 16:37:21 +08:00
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(function(){
|
|
|
|
<% if Time.parse(h(@exercise.end_time)).strftime("%Y-%m-%d-%H-%M-%S") <= Time.now.strftime("%Y-%m-%d-%H-%M-%S") %>
|
2016-09-09 11:09:47 +08:00
|
|
|
$(".student_work_<%= exercise.id%>").mouseenter(function(){
|
|
|
|
$("#work_click_<%= exercise.id%>").show();
|
|
|
|
}).mouseleave(function(){
|
|
|
|
$("#work_click_<%= exercise.id%>").hide();
|
|
|
|
}).mouse;
|
2016-05-24 16:37:21 +08:00
|
|
|
$("#student_name_<%= exercise.id%>,#student_id_<%= exercise.id%>,#student_class_<%= exercise.id%>").on('click',function() {
|
|
|
|
window.location.href = '<%=show_student_result_exercise_path(@exercise,:user_id => exercise.user_id) %>';
|
|
|
|
});
|
|
|
|
<% else %>
|
|
|
|
//$("#show_student_result_div_<%#= exercise.id%>").attr("title","截止日期未到,暂不能查看学生答题结果");
|
|
|
|
$("#student_name_<%= exercise.id%>").attr("title","截止日期未到,暂不能查看学生答题结果");
|
|
|
|
$("#student_id_<%= exercise.id%>").attr("title","截止日期未到,暂不能查看学生答题结果");
|
|
|
|
$("#student_class_<%= exercise.id%>").attr("title","截止日期未到,暂不能查看学生答题结果");
|
|
|
|
<% end %>
|
|
|
|
});
|
|
|
|
/*function show_result(id) {
|
|
|
|
window.location.href = '<%#=show_student_result_exercise_path(@exercise,:user_id => exercise.user.id) %>';
|
|
|
|
}*/
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<% end%>
|
2016-05-20 15:15:42 +08:00
|
|
|
</table>
|