dev_course
SylorHuang 5 years ago
parent 65d7336e58
commit 298d7e5b02

@ -201,11 +201,8 @@ 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}

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

Loading…
Cancel
Save