|
|
@ -4208,7 +4208,7 @@ end
|
|
|
|
sheet1 = book.create_worksheet :name => "course"
|
|
|
|
sheet1 = book.create_worksheet :name => "course"
|
|
|
|
blue = Spreadsheet::Format.new :color => :blue, :weight => :bold, :size => 10
|
|
|
|
blue = Spreadsheet::Format.new :color => :blue, :weight => :bold, :size => 10
|
|
|
|
sheet1.row(0).default_format = blue
|
|
|
|
sheet1.row(0).default_format = blue
|
|
|
|
sheet1.row(0).concat(["ID","课堂名称","成员","资源","普通作业"," 实训作业","试卷","私有","状态","创建者单位","创建者","动态时间","创建时间"])
|
|
|
|
sheet1.row(0).concat(["ID","课堂名称","成员","资源","普通作业"," 实训作业","试卷","评测次数", "私有","状态","创建者单位","创建者","动态时间","创建时间"])
|
|
|
|
count_row = 1
|
|
|
|
count_row = 1
|
|
|
|
courses.each do |course|
|
|
|
|
courses.each do |course|
|
|
|
|
school = course.teacher.try(:user_extensions).try(:school).try(:name).blank? ? "--" : course.teacher.school_name
|
|
|
|
school = course.teacher.try(:user_extensions).try(:school).try(:name).blank? ? "--" : course.teacher.school_name
|
|
|
@ -4220,6 +4220,7 @@ end
|
|
|
|
sheet1[count_row,4] = course.homework_commons.where(:homework_type => 1).count
|
|
|
|
sheet1[count_row,4] = course.homework_commons.where(:homework_type => 1).count
|
|
|
|
sheet1[count_row,5] = course.homework_commons.where(:homework_type => 4).count
|
|
|
|
sheet1[count_row,5] = course.homework_commons.where(:homework_type => 4).count
|
|
|
|
sheet1[count_row,6] = course.exercises.count
|
|
|
|
sheet1[count_row,6] = course.exercises.count
|
|
|
|
|
|
|
|
sheet1[count_row,6] = course.evaluate_count
|
|
|
|
sheet1[count_row,7] = course.is_public.to_i == 1 ? '否' : '是'
|
|
|
|
sheet1[count_row,7] = course.is_public.to_i == 1 ? '否' : '是'
|
|
|
|
sheet1[count_row,8] = course.is_end ? "已结束" : "正在进行"
|
|
|
|
sheet1[count_row,8] = course.is_end ? "已结束" : "正在进行"
|
|
|
|
sheet1[count_row,9] = school
|
|
|
|
sheet1[count_row,9] = school
|
|
|
|