socialforge/app/views/exercise/_student_exercise.html.erb

73 lines
3.3 KiB
Plaintext
Raw Normal View History

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();
});
</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 onclick="" style="cursor: pointer;" class="student_work_<%= exercise.id%>">
<li>
<ul class="mt10 fl">
<li class="hworkStName mr15 mt16" title="姓名">
<%= exercise.user.show_name%>
</li>
<li class="hworkStID mr10 mt16" title="学号">
<%= exercise.user.user_extensions.nil? ? "--" : exercise.user.user_extensions.student_id%>
</li>
<li class="hworkStID mt16" title="班级">
--
</li>
</ul>
</li>
</div>
</ul>
</li>
<li class="hworkList130 c_grey student_work_<%= exercise.id%>" onclick="" style="cursor: pointer;">
<% if exercise.created_at%>
<%= Time.parse(format_time(exercise.created_at)).strftime("%m-%d %H:%M")%>&nbsp;
<% 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%>