2015-11-17 09:33:40 +08:00
|
|
|
<div class="fl" style="padding-bottom:10px; width:720px;">
|
|
|
|
<span class="c_dark f14 fb fl mr30">
|
|
|
|
测验
|
|
|
|
<font class="f12 c_red">
|
|
|
|
(<%= @exercise_count%>人已交)
|
|
|
|
</font>
|
|
|
|
<% if !@is_teacher && @exercise_users_list.empty?%>
|
|
|
|
<span class="f12 c_red">您尚未提交</span>
|
|
|
|
<% elsif !@is_teacher && !@exercise_users_list.empty?%>
|
|
|
|
<span class="f12 c_red">您已提交</span>
|
|
|
|
<% end %>
|
|
|
|
</span>
|
2015-11-17 15:18:07 +08:00
|
|
|
<%#if @is_teacher || @exercise.exercise_status == 3%>
|
|
|
|
<!--<div class="hworkSearchBox">
|
|
|
|
<input type="text" id="course_student_name" value="<%#= @name%>" placeholder="姓名、学号、邮箱" class="hworkSearchInput" onkeypress="SearchByName('<%#= student_work_index_path(:homework => @homework.id)%>',event);"/>
|
2015-11-17 09:33:40 +08:00
|
|
|
<a class="hworkSearchIcon" id="search_in_student_work" onclick="SearchByName_1('<%#= student_work_index_path(:homework => @homework.id)%>');" href="javascript:void(0)"></a>
|
2015-11-17 15:18:07 +08:00
|
|
|
</div>-->
|
2015-11-17 09:33:40 +08:00
|
|
|
<%#= select_tag(:student_work_in_group,options_for_select(course_group_list(@course),@group), {:class => "classSplit"}) unless course_group_list(@course).empty? %>
|
2015-11-17 15:18:07 +08:00
|
|
|
<%# end%>
|
2015-11-17 09:33:40 +08:00
|
|
|
<span class="fr c_grey"> <a href="javascript:void(0);" class="linkGrey2" id="homework_info_show" style="display: none">[ 显示测验信息 ]</a> </span>
|
|
|
|
</div>
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
|
|
|
<div class="fl">
|
2015-11-17 15:18:07 +08:00
|
|
|
<%= render :partial => "student_table"%>
|
2015-11-17 09:33:40 +08:00
|
|
|
</div>
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
2015-11-17 15:18:07 +08:00
|
|
|
<% @exercise_users_list.each do |exercise|%>
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(".student_work_<%= exercise.id%>").mouseenter(function(){
|
|
|
|
$("#work_click_<%= exercise.id%>").show();
|
|
|
|
}).mouseleave(function(){
|
|
|
|
$("#work_click_<%= exercise.id%>").hide();
|
|
|
|
});
|
2015-12-11 16:35:43 +08:00
|
|
|
$(function(){
|
|
|
|
<% if Time.parse(h(@exercise.end_time)).strftime("%Y-%m-%d-%H-%M-%S") <= Time.now.strftime("%Y-%m-%d-%H-%M-%S") %>
|
2015-12-15 17:31:27 +08:00
|
|
|
$("#show_student_result_div_<%= exercise.id%>").on('click',function() {
|
|
|
|
window.location.href = '<%=show_student_result_exercise_path(@exercise,:user_id => exercise.user_id) %>';
|
|
|
|
});
|
2015-12-11 16:35:43 +08:00
|
|
|
<% else %>
|
2015-12-15 16:51:21 +08:00
|
|
|
$("#show_student_result_div_<%= exercise.id%>").attr("title","截止日期未到,暂不能查看学生答题结果");
|
2015-12-15 16:02:10 +08:00
|
|
|
$("#student_name_<%= exercise.id%>").attr("title","截止日期未到,暂不能查看学生答题结果");
|
|
|
|
$("#student_id_<%= exercise.id%>").attr("title","截止日期未到,暂不能查看学生答题结果");
|
|
|
|
$("#student_class_<%= exercise.id%>").attr("title","截止日期未到,暂不能查看学生答题结果");
|
2015-12-11 16:35:43 +08:00
|
|
|
<% end %>
|
|
|
|
});
|
2015-12-15 17:31:27 +08:00
|
|
|
/*function show_result(id) {
|
|
|
|
window.location.href = '<%#=show_student_result_exercise_path(@exercise,:user_id => exercise.user.id) %>';
|
|
|
|
}*/
|
2015-11-17 15:18:07 +08:00
|
|
|
</script>
|
|
|
|
<ul class="hworkListRow" id="student_work_<%= exercise.id%>">
|
2016-05-12 17:41:27 +08:00
|
|
|
<li class="ml5 mr5" style="width:28px; text-align:center;">1</li>
|
|
|
|
<li class="hworkPortrait mt15 mr10">
|
|
|
|
<%= link_to(image_tag(url_to_avatar(exercise.user),:width =>"40",:height => "40",:style => "display:block;"),user_activities_path(exercise.user)) %>
|
2015-11-17 15:18:07 +08:00
|
|
|
</li>
|
2016-05-12 17:41:27 +08:00
|
|
|
<li class="hworkStName" title="姓名" id="student_name_<%= exercise.id%>" style="cursor:pointer;">
|
|
|
|
<%=exercise.user.show_name %>
|
|
|
|
</li><li class="hworkStID pl15 pr10" title="学号" id="student_id_<%= exercise.id%>" style="cursor:pointer;">
|
|
|
|
<%= exercise.user.user_extensions.nil? ? "--" : exercise.user.user_extensions.student_id%>
|
|
|
|
</li>
|
|
|
|
<li class="hworkStID" title="班级" id="student_class_<%= exercise.id%>" style="cursor:pointer;">
|
|
|
|
--
|
|
|
|
</li>
|
|
|
|
<li class="hworkList130 ml200 c_grey student_work_<%= exercise.id%>">
|
2015-11-17 15:18:07 +08:00
|
|
|
<% if exercise.created_at%>
|
|
|
|
<%= Time.parse(format_time(exercise.created_at)).strftime("%m-%d %H:%M")%>
|
2015-12-18 12:47:34 +08:00
|
|
|
<% if @exercise.end_time <= exercise.created_at %>
|
|
|
|
<span class="c_red">[未答]</span>
|
|
|
|
<% end %>
|
2015-11-17 15:18:07 +08:00
|
|
|
<% end %>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li class="hworkList50 <%= score_color exercise.score%> student_final_scor_info">
|
|
|
|
<%= exercise.score.nil? ? "--" : format("%.1f",exercise.score)%>
|
|
|
|
</li>
|
|
|
|
<li class="hworkTip" style="display: none" id="work_click_<%= exercise.id%>"><em></em><span></span><font class="fontGrey2">点击查看详情</font></li>
|
|
|
|
</ul>
|
|
|
|
|
2015-11-17 09:33:40 +08:00
|
|
|
<div class="cl"></div>
|
|
|
|
<% end%>
|