|
|
@ -65,7 +65,7 @@ class Admins::ShixunSettingsController < Admins::BaseController
|
|
|
|
sheet1.row(0).default_format = blue
|
|
|
|
sheet1.row(0).default_format = blue
|
|
|
|
sheet1.row(0).concat(["实训ID","实训名称","技术平台", "Fork源", "实践任务","选择题任务","挑战人数", "通关人数", "状态","创建者", "单位", "职业", "关卡序号","关卡名称","技能标签"])
|
|
|
|
sheet1.row(0).concat(["实训ID","实训名称","技术平台", "Fork源", "实践任务","选择题任务","挑战人数", "通关人数", "状态","创建者", "单位", "职业", "关卡序号","关卡名称","技能标签"])
|
|
|
|
count_row = 1
|
|
|
|
count_row = 1
|
|
|
|
shixuns.includes(:challenges, :user, :myshixuns, :mirror_repositories).find_each do |shixun|
|
|
|
|
shixuns.includes(:fork_shixuns, :myshixuns, :mirror_repositories, challenges: [:challenge_tags], user: [user_extension: :school]).find_each do |shixun|
|
|
|
|
sheet1[count_row, 0] = shixun.identifier
|
|
|
|
sheet1[count_row, 0] = shixun.identifier
|
|
|
|
sheet1[count_row, 1] = shixun.name
|
|
|
|
sheet1[count_row, 1] = shixun.name
|
|
|
|
sheet1[count_row, 2] = shixun.mirror_repositories.select{|mr| mr.main_type == "1"}.first&.type_name
|
|
|
|
sheet1[count_row, 2] = shixun.mirror_repositories.select{|mr| mr.main_type == "1"}.first&.type_name
|
|
|
|