Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
328b9b5e5b
|
@ -17,6 +17,7 @@ class ZipdownController < ApplicationController
|
|||
@project = obj.courses[0]
|
||||
end
|
||||
end
|
||||
|
||||
def assort
|
||||
obj_class = params[:obj_class]
|
||||
obj_id = params[:obj_id]
|
||||
|
@ -76,18 +77,18 @@ class ZipdownController < ApplicationController
|
|||
|
||||
homeattaches = bid.homeworks
|
||||
#记录所有作业是不是有附件,有一个附件就改为true
|
||||
has_file = false
|
||||
#has_file = false
|
||||
# 得到每一个人所有文件打包的zip文件
|
||||
# 并将每一个人的zip打包为一个并返回路径
|
||||
user_zip_paths = homeattaches.map do |homeattach|
|
||||
if homeattach.attachments.count > 0
|
||||
zip_homework_by_user homeattach
|
||||
has_file = true unless has_file
|
||||
#has_file = true unless has_file
|
||||
end
|
||||
end
|
||||
unless has_file
|
||||
render file: 'public/no_file_fond.html' , :layout => 'course_base'
|
||||
end
|
||||
#unless has_file
|
||||
# render file: 'public/no_file_fond.html' , :layout => 'course_base'
|
||||
#end
|
||||
zipping "#{Time.now.to_i}_#{bid.name}.zip", user_zip_paths, OUTPUT_FOLDER
|
||||
|
||||
#@paths = homeworks_attach_path
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
|
||||
<div class="autoscroll">
|
||||
<table class="list" style="width: 100%;table-layout: fixed">
|
||||
<table class="list" style="width: 100%;table-layout: fixed;">
|
||||
<thead>
|
||||
<tr >
|
||||
<%= sort_header_tag('login', :caption => l(:field_login)) %>
|
||||
|
|
|
@ -78,7 +78,7 @@
|
|||
<% end %>
|
||||
</td>
|
||||
<td rowspan="4" style="text-align: center;vertical-align: middle;width: 30px">
|
||||
<% if Time.parse(@bid.deadline.to_s) < Time.parse(homework.created_at.to_s) %>
|
||||
<% if Time.parse(@bid.deadline.to_s).strftime("%Y-%m-%d") < Time.parse(homework.created_at.to_s).strftime("%Y-%m-%d") %>
|
||||
<span class="required">迟交</span>
|
||||
<% end %>
|
||||
</td>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<hr />
|
||||
<% attachments_results.each do |file| %>
|
||||
<p class="font_description2">
|
||||
<table border=0 cellSpacing=0 cellPadding=0>
|
||||
<table border=0 cellSpacing=0 cellPadding=0 style="width: 100%;table-layout: fixed;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="r1">
|
||||
|
|
|
@ -1389,7 +1389,7 @@ a.toggle-all:hover {text-decoration:none;}
|
|||
|
||||
table.list tbody tr:hover { background-color:#ffffdd; }
|
||||
table.list tbody tr.group:hover { background-color:inherit; }
|
||||
table td {padding:2px;}
|
||||
table td {padding:2px;word-break: break-all;word-wrap: break-word;}
|
||||
table p {margin:0;}
|
||||
.odd {background-color:#f6f7f8;}
|
||||
.even {background-color: #fff;}
|
||||
|
|
Loading…
Reference in New Issue