dev_course
SylorHuang 6 years ago
parent 1961753273
commit 152fcd9bc4

@ -200,10 +200,15 @@ class HomeworkCommonsController < ApplicationController
if @user_course_identity >= Course::STUDENT
tip_exception(403, "无权限操作")
else
student_work_to_xlsx(@work_excel,@homework)
exercise_export_name = current_user.real_name + "_" + @course.name + "_" + @homework.name + "_" + Time.now.strftime('%Y%m%d_%H%M%S')
render xlsx: "#{exercise_export_name.strip.first(30)}",template: "homework_commons/works_list.xlsx.axlsx",locals:
{table_columns: @work_head_cells,task_users: @work_cells_column}
if @work_excel.size > 0
student_work_to_xlsx(@work_excel,@homework)
exercise_export_name = current_user.real_name + "_" + @course.name + "_" + @homework.name + "_" + Time.now.strftime('%Y%m%d_%H%M%S')
render xlsx: "#{exercise_export_name.strip.first(30)}",template: "homework_commons/works_list.xlsx.axlsx",locals:
{table_columns: @work_head_cells,task_users: @work_cells_column}
else
normal_status(-1,"暂无提交的学生!")
end
end
}
format.zip{

@ -18,7 +18,7 @@
</div>
</div>
<div class="mbt20 bgc">
<div class="ex-scores pd10 text-gray fs13">
<div class="ex-scores pd10 text-gray fs13 width100">
<div class="inline-block pull-left max-100">
<% if @exercise_single_ques_count > 0 %>
<span class="mr15">单选题<span class="mlr5"><%= @exercise_single_ques_count %></span>题,

@ -306,6 +306,10 @@ textarea{
.max-100{
max-width:100%;
}
.width100{
width:100%;
word-break:normal;
}

Loading…
Cancel
Save