86 lines
4.2 KiB
Plaintext
86 lines
4.2 KiB
Plaintext
<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>
|
|
<%#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);"/>
|
|
<a class="hworkSearchIcon" id="search_in_student_work" onclick="SearchByName_1('<%#= student_work_index_path(:homework => @homework.id)%>');" href="javascript:void(0)"></a>
|
|
</div>-->
|
|
<%#= select_tag(:student_work_in_group,options_for_select(course_group_list(@course),@group), {:class => "classSplit"}) unless course_group_list(@course).empty? %>
|
|
<%# end%>
|
|
<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">
|
|
<%= render :partial => "student_table"%>
|
|
</div>
|
|
<div class="cl"></div>
|
|
|
|
<% @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();
|
|
});
|
|
$(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) %>';
|
|
}
|
|
</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>
|
|
<div id="show_student_result_div" style="cursor: pointer;" class="student_work_<%= exercise.id%>">
|
|
<li>
|
|
<ul class="mt10 fl">
|
|
<li class="hworkStName mr15 mt16" title="姓名" id="student_name_id">
|
|
<%=exercise.user.show_name %>
|
|
</li>
|
|
<li class="hworkStID mr10 mt16" title="学号" id="student_id_id">
|
|
<%= exercise.user.user_extensions.nil? ? "--" : exercise.user.user_extensions.student_id%>
|
|
</li>
|
|
<li class="hworkStID mt16" title="班级" id="student_class_id">
|
|
--
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</div>
|
|
</ul>
|
|
</li>
|
|
<li class="hworkList130 c_grey student_work_<%= exercise.id%>">
|
|
<% 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>
|
|
|
|
<div class="cl"></div>
|
|
<% end%> |