导出的测验成绩列表添加”班级“
This commit is contained in:
parent
2d73933f4f
commit
2aea4da310
|
@ -615,7 +615,7 @@ class ExerciseController < ApplicationController
|
|||
sheet1 = book.create_worksheet :name => "exercise"
|
||||
blue = Spreadsheet::Format.new :color => :blue, :weight => :bold, :size => 10
|
||||
sheet1.row(0).default_format = blue
|
||||
sheet1.row(0).concat([l(:excel_user_id),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_mail),l(:excel_f_score),l(:excel_commit_time)])
|
||||
sheet1.row(0).concat([l(:excel_user_id),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_mail),l(:excel_class),l(:excel_f_score),l(:excel_commit_time)])
|
||||
count_row = 1
|
||||
items.each do |exercise|
|
||||
sheet1[count_row,0]=exercise.user.id
|
||||
|
@ -623,8 +623,9 @@ class ExerciseController < ApplicationController
|
|||
sheet1[count_row,2] = exercise.user.login
|
||||
sheet1[count_row,3] = exercise.user.user_extensions.student_id
|
||||
sheet1[count_row,4] = exercise.user.mail
|
||||
sheet1[count_row,5] = exercise.score
|
||||
sheet1[count_row,6] = format_time(exercise.created_at)
|
||||
sheet1[count_row,5] = ""
|
||||
sheet1[count_row,6] = exercise.score
|
||||
sheet1[count_row,7] = format_time(exercise.created_at)
|
||||
count_row += 1
|
||||
end
|
||||
book.write xls_report
|
||||
|
|
Loading…
Reference in New Issue