分组作业成绩导出

This commit is contained in:
cxt 2018-01-11 09:35:29 +08:00
parent 346d050736
commit f9a507ec11
1 changed files with 2 additions and 2 deletions

View File

@ -1705,11 +1705,11 @@ class StudentWorkController < ApplicationController
sheet1[count_row,10] = homework.student_score.nil? ? l(:label_without_score) : homework.student_score.round(2)
sheet1[count_row,11] = (@homework.teacher_priority == 1 && !homework.teacher_score.nil?) ? 0 : homework.absence_penalty
sheet1[count_row,12] = (@homework.teacher_priority == 1 && !homework.teacher_score.nil?) ? 0 : homework.late_penalty
sheet1[count_row,13] = homework.respond_to?("score") ? homework.score.nil? ? l(:label_without_score) : homework.score.round(2) : l(:label_without_score)
sheet1[count_row,13] = homework.work_score.nil? ? l(:label_without_score) : homework.work_score.round(2)
sheet1[count_row,14] = homework.commit_time ? format_time(homework.commit_time) : "未提交"
else
sheet1[count_row,10] = (@homework.teacher_priority == 1 && !homework.teacher_score.nil?) ? 0 : homework.late_penalty
sheet1[count_row,11] = homework.respond_to?("score") ? homework.score.nil? ? l(:label_without_score) : homework.score.round(2) : l(:label_without_score)
sheet1[count_row,11] = homework.work_score.nil? ? l(:label_without_score) : homework.work_score.round(2)
sheet1[count_row,12] = homework.commit_time ? format_time(homework.commit_time) : "未提交"
end
count_row += 1