|
|
@ -201,13 +201,14 @@ class HomeworkCommonsController < ApplicationController
|
|
|
|
tip_exception(403, "无权限操作")
|
|
|
|
tip_exception(403, "无权限操作")
|
|
|
|
else
|
|
|
|
else
|
|
|
|
if @work_excel.present?
|
|
|
|
if @work_excel.present?
|
|
|
|
|
|
|
|
Rails.logger.info("############_____________@work_excel_________###############{@work_excel.size}")
|
|
|
|
|
|
|
|
Rails.logger.info("############_____________@homework_________###############{@homework.id}")
|
|
|
|
student_work_to_xlsx(@work_excel,@homework)
|
|
|
|
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')
|
|
|
|
exercise_export_name = current_user.real_name + "_" + @course.name + "_" + @homework.name + "_" + Time.now.strftime('%Y%m%d_%H%M%S')
|
|
|
|
|
|
|
|
Rails.logger.info("############_____________exercise_export_name_________###############{exercise_export_name}")
|
|
|
|
|
|
|
|
|
|
|
|
render xlsx: "#{exercise_export_name.strip.first(30)}",template: "homework_commons/works_list.xlsx.axlsx",locals:
|
|
|
|
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}
|
|
|
|
{table_columns: @work_head_cells,task_users: @work_cells_column}
|
|
|
|
Rails.logger.info("############_____________@work_head_cells_________###############{@work_head_cells}")
|
|
|
|
|
|
|
|
Rails.logger.info("############_____________@work_cells_column_________###############{@work_cells_column}")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
else
|
|
|
|
else
|
|
|
|
normal_status(-1,"暂无提交的学生!")
|
|
|
|
normal_status(-1,"暂无提交的学生!")
|
|
|
|
end
|
|
|
|
end
|
|
|
|