diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index d4646f7d5..41e4c784f 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -1000,7 +1000,7 @@ class StudentWorkController < ApplicationController blue = Spreadsheet::Format.new :color => :blue, :weight => :bold, :size => 10 sheet1.row(0).default_format = blue if @homework.homework_type == 1 #匿评作业 - sheet1.row(0).concat([l(:excel_user_id),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_mail),l(:excel_homework_name), + sheet1.row(0).concat([l(:excel_user_id),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_mail),l(:excel_homework_name),l(:excel_homework_des), l(:excel_t_score),l(:excel_ta_score), l(:excel_n_score),l(:excel_f_score),l(:excel_commit_time)]) count_row = 1 items.each do |homework| @@ -1010,15 +1010,16 @@ class StudentWorkController < ApplicationController sheet1[count_row,3] = homework.user.user_extensions.student_id sheet1[count_row,4] = homework.user.mail sheet1[count_row,5] = homework.name - sheet1[count_row,6] = homework.teacher_score.nil? ? l(:label_without_score) : format("%.2f",homework.teacher_score) - sheet1[count_row,7] = homework.teaching_asistant_score.nil? ? l(:label_without_score) : format("%.2f",homework.teaching_asistant_score) - sheet1[count_row,8] = homework.student_score.nil? ? l(:label_without_score) : format("%.2f",homework.student_score) - sheet1[count_row,9] = homework.respond_to?("score") ? homework.score.nil? ? l(:label_without_score) : format("%.2f",homework.score) : l(:label_without_score) - sheet1[count_row,10] = format_time(homework.created_at) + sheet1[count_row,6] = homework.description + sheet1[count_row,7] = homework.teacher_score.nil? ? l(:label_without_score) : format("%.2f",homework.teacher_score) + sheet1[count_row,8] = homework.teaching_asistant_score.nil? ? l(:label_without_score) : format("%.2f",homework.teaching_asistant_score) + sheet1[count_row,9] = homework.student_score.nil? ? l(:label_without_score) : format("%.2f",homework.student_score) + sheet1[count_row,10] = homework.respond_to?("score") ? homework.score.nil? ? l(:label_without_score) : format("%.2f",homework.score) : l(:label_without_score) + sheet1[count_row,11] = format_time(homework.created_at) count_row += 1 end elsif @homework.homework_type == 2 #编程作业 - sheet1.row(0).concat([l(:excel_user_id),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_mail),l(:excel_homework_name), + sheet1.row(0).concat([l(:excel_user_id),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_mail),l(:excel_homework_name),l(:excel_homework_des), l(:excel_t_score),l(:excel_ta_score), l(:excel_s_score),l(:excel_n_score),l(:excel_f_score),l(:excel_commit_time)]) count_row = 1 items.each do |homework| @@ -1028,12 +1029,13 @@ class StudentWorkController < ApplicationController sheet1[count_row,3] = homework.user.user_extensions.student_id sheet1[count_row,4] = homework.user.mail sheet1[count_row,5] = homework.name - sheet1[count_row,6] = homework.teacher_score.nil? ? l(:label_without_score) : format("%.2f",homework.teacher_score) - sheet1[count_row,7] = homework.teaching_asistant_score.nil? ? l(:label_without_score) : format("%.2f",homework.teaching_asistant_score) - sheet1[count_row,8] = homework.system_score.nil? ? l(:label_without_score) : format("%.2f",homework.system_score) - sheet1[count_row,9] = homework.student_score.nil? ? l(:label_without_score) : format("%.2f",homework.student_score) - sheet1[count_row,10] = homework.respond_to?("score") ? homework.score.nil? ? l(:label_without_score) : format("%.2f",homework.score) : l(:label_without_score) - sheet1[count_row,11] = format_time(homework.created_at) + sheet1[count_row,6] = homework.description + sheet1[count_row,7] = homework.teacher_score.nil? ? l(:label_without_score) : format("%.2f",homework.teacher_score) + sheet1[count_row,8] = homework.teaching_asistant_score.nil? ? l(:label_without_score) : format("%.2f",homework.teaching_asistant_score) + sheet1[count_row,9] = homework.system_score.nil? ? l(:label_without_score) : format("%.2f",homework.system_score) + sheet1[count_row,10] = homework.student_score.nil? ? l(:label_without_score) : format("%.2f",homework.student_score) + sheet1[count_row,11] = homework.respond_to?("score") ? homework.score.nil? ? l(:label_without_score) : format("%.2f",homework.score) : l(:label_without_score) + sheet1[count_row,12] = format_time(homework.created_at) count_row += 1 end end diff --git a/config/locales/zh.yml b/config/locales/zh.yml index e67ca806d..088ce3d8e 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -1864,6 +1864,7 @@ zh: excel_student_id: 学号 excel_mail: 电子邮箱 excel_homework_name: 作品名 + excel_homework_des: 作品描述 excel_t_score: 教师评分 excel_ta_score: 教辅评分 excel_n_score: 匿名评分