dev_course
SylorHuang 6 years ago
parent 17affc5de2
commit 65d7336e58

@ -201,13 +201,14 @@ class HomeworkCommonsController < ApplicationController
tip_exception(403, "无权限操作")
else
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)
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:
{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
normal_status(-1,"暂无提交的学生!")
end

@ -104,6 +104,8 @@ module ExportHelper
@work_cells_column.push(row_cells_column)
end
else #实训题
Rails.logger.info("############_____________homework.homework_type_________###############{homework.homework_type}")
shixun = homework.shixuns.first
shixun_head_cells = %w(完成情况 通关时间 总耗时 总评测次数 获得经验值 关卡得分)
eff_boolean = homework.work_efficiency

Loading…
Cancel
Save