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") %>
|
|
|
|
$("#show_student_result_div").on('click',show_result);
|
|
|
|
<% else %>
|
|
|
|
$("#show_student_result_div").attr("title","截止日期未到,暂不能查看学生答题结果");
|
|
|
|
$("#student_name_id").attr("title","截止日期未到,暂不能查看学生答题结果");
|
|
|
|
$("#student_id_id").attr("title","截止日期未到,暂不能查看学生答题结果");
|
|
|
|
$("#student_class_id").attr("title","截止日期未到,暂不能查看学生答题结果");
|
|
|
|
<% end %>
|
|
|
|
});
|
|
|
|
function show_result() {
|
|
|
|
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%>">
|
|
|
|
<li class="hworkList340 width530">
|
|
|
|
<ul>
|
|
|
|
<li class="hworkPortrait mt15 mr10">
|
|
|
|
<%= link_to(image_tag(url_to_avatar(exercise.user),:width =>"40",:height => "40"),user_activities_path(exercise.user)) %>
|
|
|
|
</li>
|
2015-12-11 16:35:43 +08:00
|
|
|
<div id="show_student_result_div" style="cursor: pointer;" class="student_work_<%= exercise.id%>">
|
2015-11-17 15:18:07 +08:00
|
|
|
<li>
|
|
|
|
<ul class="mt10 fl">
|
2015-12-11 16:35:43 +08:00
|
|
|
<li class="hworkStName mr15 mt16" title="姓名" id="student_name_id">
|
|
|
|
<%=exercise.user.show_name %>
|
2015-11-17 15:18:07 +08:00
|
|
|
</li>
|
2015-12-11 16:35:43 +08:00
|
|
|
<li class="hworkStID mr10 mt16" title="学号" id="student_id_id">
|
2015-11-17 15:18:07 +08:00
|
|
|
<%= exercise.user.user_extensions.nil? ? "--" : exercise.user.user_extensions.student_id%>
|
|
|
|
</li>
|
2015-12-11 16:35:43 +08:00
|
|
|
<li class="hworkStID mt16" title="班级" id="student_class_id">
|
2015-11-17 15:18:07 +08:00
|
|
|
--
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
</div>
|
|
|
|
</ul>
|
|
|
|
</li>
|
2015-12-11 16:35:43 +08:00
|
|
|
<li class="hworkList130 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")%>
|
|
|
|
<% 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%>
|