cxt_course v20160906_04
cxt 9 years ago
commit 8edfec258b

@ -1,71 +1,71 @@
<table class="hwork-table-wrap" style="border-bottom:1px solid #eaeaea;"> <table class="hwork-table-wrap" style="border-bottom:1px solid #eaeaea;">
<tr class="b_grey hworkH30"> <tr class="b_grey hworkH30">
<th class="hworkList30 pl5 pr5"><span class="c_dark f14 fb">序号</span></th> <th class="hworkList30 pl5 pr5"><span class="c_dark f14 fb">序号</span></th>
<th class="hworkList50">&nbsp;&nbsp;</th> <th class="hworkList50">&nbsp;&nbsp;</th>
<th class="hworkList60"><span class="c_dark f14 fb">姓名</span></th> <th class="hworkList60"><span class="c_dark f14 fb">姓名</span></th>
<th class="hworkList80"><span class="c_dark f14 fb">学号</span></th> <th class="hworkList80"><span class="c_dark f14 fb">学号</span></th>
<th class="hworkList80"><span class="c_dark f14 fb">班级</span></th> <th class="hworkList80"><span class="c_dark f14 fb">班级</span></th>
<th width="230">&nbsp;&nbsp;</th> <th width="230">&nbsp;&nbsp;</th>
<th class="hworkList130"> <th class="hworkList130">
<%= link_to "时间",'',:class => "c_dark f14 fb" ,:remote => true%> <%= link_to "时间",'',:class => "c_dark f14 fb" ,:remote => true%>
</th> </th>
<th class="hworkList50"> <th class="hworkList50">
<%= link_to "成绩",'',:class => "c_dark f14 fb",:remote => true%> <%= link_to "成绩",'',:class => "c_dark f14 fb",:remote => true%>
</th> </th>
</tr> </tr>
<% @exercise_users_list.each_with_index do |exercise, index|%> <% @exercise_users_list.each_with_index do |exercise, index|%>
<tr class="hworkListRow" id="student_work_<%= exercise.id%>"> <tr class="hworkListRow" id="student_work_<%= exercise.id%>">
<td class="pl5 pr5" style="text-align:center;"><%=index + 1 %></td> <td class="pl5 pr5" style="text-align:center;"><%=index + 1 %></td>
<td class="hworkPortrait pr10 float-none"> <td class="hworkPortrait pr10 float-none">
<%= link_to(image_tag(url_to_avatar(exercise.user),:width =>"40",:height => "40",:style => "display:block;", :class => "mt15"),user_activities_path(exercise.user)) %> <%= link_to(image_tag(url_to_avatar(exercise.user),:width =>"40",:height => "40",:style => "display:block;", :class => "mt15"),user_activities_path(exercise.user)) %>
</td> </td>
<td class="hworkStName student_work_<%= exercise.id%>" title="姓名" id="student_name_<%= exercise.id%>" style="cursor:pointer;"> <td class="hworkStName student_work_<%= exercise.id%>" title="姓名" id="student_name_<%= exercise.id%>" style="cursor:pointer;">
<%=exercise.user.show_name %> <%=exercise.user.show_name %>
</td> </td>
<td class="hworkStID student_work_<%= exercise.id%> pl15 pr10 float-none" title="学号" id="student_id_<%= exercise.id%>" style="cursor:pointer;"> <td class="hworkStID student_work_<%= exercise.id%> pl15 pr10 float-none" title="学号" id="student_id_<%= exercise.id%>" style="cursor:pointer;">
<span class="hidden fl" style="width:80px;"><%= exercise.user.user_extensions.nil? ? "--" : exercise.user.user_extensions.student_id%></span> <span class="hidden fl" style="width:55px;"><%= exercise.user.user_extensions.nil? ? "--" : exercise.user.user_extensions.student_id%></span>
</td> </td>
<td class="hworkStID student_work_<%= exercise.id%> float-none" title="班级" id="student_class_<%= exercise.id%>" style="cursor:pointer;"> <td class="hworkStID student_work_<%= exercise.id%> float-none" title="班级" id="student_class_<%= exercise.id%>" style="cursor:pointer;">
-- --
</td> </td>
<td width="230">&nbsp;</td> <td width="230">&nbsp;</td>
<td class="hworkList130 c_grey"> <td class="hworkList130 c_grey">
<% if exercise.created_at%> <% if exercise.created_at%>
<%= Time.parse(format_time(exercise.created_at)).strftime("%m-%d %H:%M")%>&nbsp; <%= Time.parse(format_time(exercise.created_at)).strftime("%m-%d %H:%M")%>&nbsp;
<% if @exercise.end_time <= exercise.created_at %> <% if @exercise.end_time <= exercise.created_at %>
<span class="c_red">[未答]</span> <span class="c_red">[未答]</span>
<% end %> <% end %>
<% end %> <% end %>
</td> </td>
<td class="hworkList50 <%= score_color exercise.score%> student_final_scor_info"> <td class="hworkList50 <%= score_color exercise.score%> student_final_scor_info">
<%= exercise.score.nil? ? "--" : format("%.1f",exercise.score)%> <%= exercise.score.nil? ? "--" : format("%.1f",exercise.score)%>
</td> </td>
<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> <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>
</tr> </tr>
<script type="text/javascript"> <script type="text/javascript">
$(".student_work_<%= exercise.id%>").mouseenter(function(){ $(".student_work_<%= exercise.id%>").mouseenter(function(){
$("#work_click_<%= exercise.id%>").show(); $("#work_click_<%= exercise.id%>").show();
}).mouseleave(function(){ }).mouseleave(function(){
$("#work_click_<%= exercise.id%>").hide(); $("#work_click_<%= exercise.id%>").hide();
}).mouse; }).mouse;
$(function(){ $(function(){
<% if Time.parse(h(@exercise.end_time)).strftime("%Y-%m-%d-%H-%M-%S") <= Time.now.strftime("%Y-%m-%d-%H-%M-%S") %> <% if Time.parse(h(@exercise.end_time)).strftime("%Y-%m-%d-%H-%M-%S") <= Time.now.strftime("%Y-%m-%d-%H-%M-%S") %>
$("#student_name_<%= exercise.id%>,#student_id_<%= exercise.id%>,#student_class_<%= exercise.id%>").on('click',function() { $("#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) %>'; window.location.href = '<%=show_student_result_exercise_path(@exercise,:user_id => exercise.user_id) %>';
}); });
<% else %> <% else %>
//$("#show_student_result_div_<%#= exercise.id%>").attr("title","截止日期未到,暂不能查看学生答题结果"); //$("#show_student_result_div_<%#= exercise.id%>").attr("title","截止日期未到,暂不能查看学生答题结果");
$("#student_name_<%= exercise.id%>").attr("title","截止日期未到,暂不能查看学生答题结果"); $("#student_name_<%= exercise.id%>").attr("title","截止日期未到,暂不能查看学生答题结果");
$("#student_id_<%= exercise.id%>").attr("title","截止日期未到,暂不能查看学生答题结果"); $("#student_id_<%= exercise.id%>").attr("title","截止日期未到,暂不能查看学生答题结果");
$("#student_class_<%= exercise.id%>").attr("title","截止日期未到,暂不能查看学生答题结果"); $("#student_class_<%= exercise.id%>").attr("title","截止日期未到,暂不能查看学生答题结果");
<% end %> <% end %>
}); });
/*function show_result(id) { /*function show_result(id) {
window.location.href = '<%#=show_student_result_exercise_path(@exercise,:user_id => exercise.user.id) %>'; window.location.href = '<%#=show_student_result_exercise_path(@exercise,:user_id => exercise.user.id) %>';
}*/ }*/
</script> </script>
<% end%> <% end%>
</table> </table>

@ -566,9 +566,9 @@ a:hover.sy_btn_orange{
a.sy_class_ltitle{display: block; font-size: 14px; width: 185px; color:#888; } a.sy_class_ltitle{display: block; font-size: 14px; width: 185px; color:#888; }
a:hover.sy_class_ltitle{ color:#333;} a:hover.sy_class_ltitle{ color:#333;}
.sy_cir_grey{ .sy_cir_grey{
font-size:12px; font-size:11px;
padding: 0 10px; padding: 0 10px;
background: #dbdbdb; background: #eee;
-webkit-border-radius: 15px; -webkit-border-radius: 15px;
-moz-border-radius: 15px; -moz-border-radius: 15px;
border-radius: 15px; border-radius: 15px;

Loading…
Cancel
Save