|
|
|
@ -4392,7 +4392,7 @@ end
|
|
|
|
|
book = Spreadsheet::Workbook.new
|
|
|
|
|
sheet1 = book.create_worksheet :name => "已发布实训课程"
|
|
|
|
|
count_row = 2
|
|
|
|
|
sheet1.row(1).concat(["", "地址", "实训课程名称","章节名称", "实训组成", "关卡数", "状态", "课程等级", "更新时间", "发布时间", ])
|
|
|
|
|
sheet1.row(1).concat(["", "地址", "实训课程名称","章节名称", "实训组成", "关卡数", "状态", "实训发布时间", "课程等级", "更新时间", "发布时间", ])
|
|
|
|
|
Rails.logger.warn("##########subjects:#{subjects.count}")
|
|
|
|
|
subjects.each do |subject|
|
|
|
|
|
sheet1[count_row,1] = "paths/"+subject.id.to_s
|
|
|
|
@ -4405,26 +4405,27 @@ end
|
|
|
|
|
sheet1[count_row,4] = "#{s_index + 1}-#{index + 1} #{shixun.name}"
|
|
|
|
|
sheet1[count_row,5] = shixun.challenges.count
|
|
|
|
|
sheet1[count_row,6] = shixun.shixun_status
|
|
|
|
|
sheet1[count_row,7] = shixun.publish_time
|
|
|
|
|
if s_index == 0 && index == 0
|
|
|
|
|
sheet1[count_row,7] = subject.subject_level_system.try(:name) || "--"
|
|
|
|
|
sheet1[count_row,8] = format_time subject.updated_at
|
|
|
|
|
sheet1[count_row,9] = format_time subject.publish_time
|
|
|
|
|
sheet1[count_row,8] = subject.subject_level_system.try(:name) || "--"
|
|
|
|
|
sheet1[count_row,9] = format_time subject.updated_at
|
|
|
|
|
sheet1[count_row,10] = format_time subject.publish_time
|
|
|
|
|
end
|
|
|
|
|
count_row += 1
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
if s_index == 0
|
|
|
|
|
sheet1[count_row,7] = subject.subject_level_system.try(:name) || "--"
|
|
|
|
|
sheet1[count_row,8] = format_time subject.updated_at
|
|
|
|
|
sheet1[count_row,9] = format_time subject.publish_time
|
|
|
|
|
sheet1[count_row,8] = subject.subject_level_system.try(:name) || "--"
|
|
|
|
|
sheet1[count_row,9] = format_time subject.updated_at
|
|
|
|
|
sheet1[count_row,10] = format_time subject.publish_time
|
|
|
|
|
end
|
|
|
|
|
count_row += 1
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
sheet1[count_row,7] = subject.subject_level_system.try(:name) || "--"
|
|
|
|
|
sheet1[count_row,8] = format_time subject.updated_at
|
|
|
|
|
sheet1[count_row,9] = format_time subject.publish_time
|
|
|
|
|
sheet1[count_row,8] = subject.subject_level_system.try(:name) || "--"
|
|
|
|
|
sheet1[count_row,9] = format_time subject.updated_at
|
|
|
|
|
sheet1[count_row,10] = format_time subject.publish_time
|
|
|
|
|
count_row += 1
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|