2015-06-25 16:06:32 +08:00
|
|
|
<script type="text/javascript">
|
|
|
|
<% if @homework.homework_type == 1 && @homework.homework_detail_manual.comment_status == 2 && !@is_teacher && @stundet_works.count > 1%>
|
|
|
|
$(function(){
|
|
|
|
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'student_work/praise_alert') %>');
|
|
|
|
showModal('ajax-modal', '500px');
|
|
|
|
$('#ajax-modal').siblings().remove();
|
|
|
|
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
|
|
|
|
"<a href='javascript:' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
|
|
|
$('#ajax-modal').parent().css("top","").css("left","");
|
|
|
|
$('#ajax-modal').parent().addClass("anonymos");
|
|
|
|
});
|
|
|
|
<% end%>
|
|
|
|
</script>
|
|
|
|
|
2015-05-21 15:52:27 +08:00
|
|
|
<div class="project_r_h">
|
|
|
|
<div id="menu_r">
|
|
|
|
<ul class="menu_r">
|
|
|
|
<li><a href="javascript:void(0);" class="parent">作业批次</a>
|
|
|
|
<ul>
|
2015-05-28 09:03:01 +08:00
|
|
|
<% @homework_commons.each_with_index { |homework_common,index |%>
|
|
|
|
<li>
|
|
|
|
<%= link_to "第#{@homework_commons.count - index}次作业",student_work_index_path(:homework => homework_common.id)%>
|
|
|
|
</li>
|
|
|
|
<%}%>
|
2015-05-21 15:52:27 +08:00
|
|
|
</ul>
|
|
|
|
</li><!---level1 end--->
|
|
|
|
</ul><!---menu_r end--->
|
|
|
|
</div>
|
|
|
|
</div><!--contentbox end-->
|
2015-05-21 17:17:54 +08:00
|
|
|
|
|
|
|
<div class="to_top" id="goTopBtn" style="display: none;">
|
|
|
|
返<br/>回<br/>顶<br/>部
|
|
|
|
</div>
|
|
|
|
<div class="cl"></div>
|
2015-05-21 15:52:27 +08:00
|
|
|
<div id="contentbox">
|
|
|
|
<div id="tb_" class="hwork_tb_">
|
|
|
|
<ul>
|
2015-05-28 12:02:26 +08:00
|
|
|
<li id="tb_1" class="hwork_hovertab" onclick="course_setting(1)">全部作品</li>
|
|
|
|
<li id="tb_2" class="hwork_normaltab" onclick="course_setting(2)">作业信息</li>
|
2015-05-21 15:52:27 +08:00
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
|
|
|
<div class="ctt">
|
|
|
|
<div class="dis" id="tbc_01">
|
|
|
|
<div class="code_list">
|
2015-05-21 17:17:54 +08:00
|
|
|
<span class="fl mt3">
|
2015-05-29 08:56:07 +08:00
|
|
|
<%= link_to "所有作品(<span class='c_red'>#{@stundet_works.count}</span>)".html_safe,student_work_index_path(:homework => @homework.id), :class => "fl"%>
|
2015-05-21 17:17:54 +08:00
|
|
|
</span>
|
2015-05-29 14:06:16 +08:00
|
|
|
<% if @show_all%>
|
2015-05-28 15:54:42 +08:00
|
|
|
<input type="text" value="<%= @name%>" placeholder="昵称、学号、姓名搜索" class="min_search ml10 fl" onkeypress="SearchByName($(this),'<%= student_work_index_path(:homework => @homework.id)%>',event);">
|
2015-06-05 10:31:51 +08:00
|
|
|
<a class="student_work_search fl" onclick="SearchByName_1($(this).prev(),'<%= student_work_index_path(:homework => @homework.id)%>');" href="javascript:void(0)">搜索</a>
|
2015-06-30 11:16:15 +08:00
|
|
|
<%= link_to("缺评情况",student_work_absence_penalty_student_work_index_path(:homework => @homework.id), :class => "student_work_search fl", :target => "_blank") if((@is_teacher || User.current.admin?) && @homework.homework_type == 1) %>
|
2015-05-28 15:54:42 +08:00
|
|
|
<% end%>
|
|
|
|
<% if @is_teacher%>
|
|
|
|
<div class="fr">
|
|
|
|
<% if @homework.student_works.empty?%>
|
2015-06-26 14:29:03 +08:00
|
|
|
<%= link_to "附件", "javascript:void(0)", class: "down_btn fr zip_download_alert", :onclick => "alert('没有学生提交作业,无法下载附件')" %>
|
2015-05-28 15:54:42 +08:00
|
|
|
<% else%>
|
|
|
|
<%= link_to "附件", zipdown_assort_path(obj_class: @homework.class, obj_id: @homework, format: :json),
|
2015-06-26 14:29:03 +08:00
|
|
|
remote: true, class: "down_btn fr zip_download_alert", :id => "download_homework_attachments" %>
|
2015-05-28 15:54:42 +08:00
|
|
|
<% end%>
|
2015-06-26 14:29:03 +08:00
|
|
|
<div class="info_ni">
|
|
|
|
使用
|
|
|
|
<span class="c_red">winzip</span>
|
|
|
|
工具进行解压可能会导致
|
|
|
|
<span class="c_red">下载文件乱码</span>
|
|
|
|
,建议您使用
|
|
|
|
<span class="c_red">winrar</span>
|
|
|
|
工具进行解压
|
|
|
|
</div>
|
2015-05-28 10:30:10 +08:00
|
|
|
|
2015-05-28 15:54:42 +08:00
|
|
|
<%= link_to l(:label_list), student_work_index_path(:homework => @homework.id,:order => @order, :sort => @b_sort, :name => @name, :format => 'xls'),:class=>'down_btn fr'%>
|
2015-06-30 15:30:51 +08:00
|
|
|
<%= link_to "匿评", student_work_index_path(:homework => @homework.id,:order => @order, :sort => @b_sort, :name => @name, :format => 'xls'),:class=>'down_btn fr'%>
|
|
|
|
<%= link_to "缺评", absence_penalty_list_student_work_index_path(:homework => @homework.id, :format => 'xls'),:class=>'down_btn fr'%>
|
2015-05-28 15:54:42 +08:00
|
|
|
<span class="mt3 fr " style="color:#136b3b;">导出全部:</span>
|
|
|
|
</div>
|
|
|
|
<% end%>
|
2015-05-21 15:52:27 +08:00
|
|
|
<div class="cl"></div>
|
|
|
|
</div><!---code_list end--->
|
|
|
|
<ul class="hwork_ul">
|
2015-05-29 15:37:23 +08:00
|
|
|
<% if @is_evaluation.nil?%>
|
|
|
|
<%= render :partial => 'student_work_title'%>
|
|
|
|
<% else%>
|
|
|
|
<%= render :partial => 'evaluation_work_title'%>
|
|
|
|
<% end%>
|
2015-05-21 15:52:27 +08:00
|
|
|
</ul><!---hwork_ul end-->
|
2015-05-21 17:17:54 +08:00
|
|
|
<div class="cl"></div>
|
2015-05-21 15:52:27 +08:00
|
|
|
|
2015-05-21 17:17:54 +08:00
|
|
|
<% @stundet_works.each do |student_work|%>
|
2015-05-29 15:37:23 +08:00
|
|
|
<%= render :partial => (@is_evaluation ? 'evaluation_work' :'student_work'),:locals => {:student_work => student_work}%>
|
2015-05-21 17:17:54 +08:00
|
|
|
<div id="about_hwork_<%= student_work.id%>" ></div>
|
|
|
|
<% end%>
|
2015-05-21 15:52:27 +08:00
|
|
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
</div><!---tbc_01 end-->
|
|
|
|
|
|
|
|
<div class="undis" id="tbc_02">
|
|
|
|
<div class="problem_main mt10">
|
2015-05-28 12:02:26 +08:00
|
|
|
<%= link_to(image_tag(url_to_avatar(@homework.user), :width => "42", :height => "42"), user_path(@homework.user), :class => "problem_pic fl") %>
|
2015-05-21 15:52:27 +08:00
|
|
|
<div class="problem_txt fl mt5">
|
2015-05-28 12:02:26 +08:00
|
|
|
<h4 class="r_txt_tit mb5">
|
|
|
|
<%= @homework.name%>
|
|
|
|
</h4>
|
2015-05-28 15:54:42 +08:00
|
|
|
<% if @is_teacher%>
|
|
|
|
<%= homework_anonymous_comment(@homework)%>
|
|
|
|
<%= link_to(l(:button_edit),edit_homework_common_path(@homework), :class => "fr mr10 work_edit") %>
|
|
|
|
<% else%>
|
|
|
|
<%= student_anonymous_comment @homework %>
|
|
|
|
<%= student_new_homework @homework %>
|
|
|
|
<% end %>
|
2015-05-21 15:52:27 +08:00
|
|
|
|
|
|
|
<div class="cl"></div>
|
2015-05-28 12:02:26 +08:00
|
|
|
<div id="bid_description_<%= @homework.id%>" class="mt5 upload_img">
|
|
|
|
<%= @homework.description.html_safe %>
|
|
|
|
</div>
|
2015-06-03 10:31:11 +08:00
|
|
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
<div class="mt5">
|
|
|
|
<% unless @homework.attachments.empty?%>
|
|
|
|
<span class="tit_fb" style="width: auto;"> 附件:</span>
|
|
|
|
<div class="fl mb5">
|
|
|
|
<%= render :partial => 'student_work/work_attachments', :locals => {:attachments => @homework.attachments} %>
|
|
|
|
</div>
|
|
|
|
<% end%>
|
|
|
|
</div>
|
|
|
|
|
2015-05-21 15:52:27 +08:00
|
|
|
<div class="cl"></div>
|
2015-05-28 12:02:26 +08:00
|
|
|
<span class="fl">截止时间:<%= @homework.end_time%></span>
|
2015-05-21 15:52:27 +08:00
|
|
|
<div >
|
2015-05-28 12:02:26 +08:00
|
|
|
<% if betweentime(@homework.end_time) < 0 %>
|
|
|
|
<span class='fr mr10 c_red '>
|
|
|
|
<%= l(:label_commit_limit)%>
|
|
|
|
</span>
|
|
|
|
<% else %>
|
|
|
|
<script type="text/javascript">
|
|
|
|
window.setInterval(function(){show_bid_dead_line(<%= @homework.end_time.year%>,<%= @homework.end_time.month%>,<%= @homework.end_time.day + 1%>,"bid_deadline_<%= @homework.id%>");},1000)
|
|
|
|
</script>
|
|
|
|
<div id="bid_deadline_<%= @homework.id%>">
|
|
|
|
</div>
|
|
|
|
<% end %>
|
2015-05-21 15:52:27 +08:00
|
|
|
</div>
|
|
|
|
</div> <!--problem_txt end-->
|
|
|
|
<div class="cl"></div>
|
|
|
|
</div><!--problem_main end-->
|
|
|
|
</div><!---tbc_02 end-->
|
|
|
|
|
|
|
|
|
|
|
|
</div><!--ctt end-->
|
|
|
|
</div><!--contentbox end-->
|