导出的作业成绩中的缺评、迟交扣分应与作品列表的一致

This commit is contained in:
cxt 2016-06-24 16:25:29 +08:00
parent d558a4d357
commit c0e58d19fa
2 changed files with 18 additions and 18 deletions

View File

@ -1305,12 +1305,12 @@ class CoursesController < ApplicationController
sheet[count_row,7] = stu.teaching_asistant_score.nil? ? l(:label_without_score) : stu.teaching_asistant_score.round(2)
if home.anonymous_comment ==0
sheet[count_row,8] = stu.student_score.nil? ? l(:label_without_score) : stu.student_score.round(2)
sheet[count_row,9] = stu.absence_penalty
sheet[count_row,10] = stu.late_penalty
sheet[count_row,9] = home.teacher_priority == 1 ? 0 : stu.absence_penalty
sheet[count_row,10] = home.teacher_priority == 1 ? 0 : stu.late_penalty
sheet[count_row,11] = stu.work_score.nil? ? l(:label_without_score) : stu.work_score.round(2)
sheet[count_row,12] = format_time(stu.created_at)
else
sheet[count_row,8] = stu.late_penalty
sheet[count_row,8] = home.teacher_priority == 1 ? 0 : stu.late_penalty
sheet[count_row,9] = stu.work_score.nil? ? l(:label_without_score) : stu.work_score.round(2)
sheet[count_row,10] = format_time(stu.created_at)
end
@ -1338,12 +1338,12 @@ class CoursesController < ApplicationController
sheet[count_row,8] = stu.system_score.nil? ? l(:label_without_score) : stu.system_score.round(2)
if home.anonymous_comment ==0
sheet[count_row,9] = stu.student_score.nil? ? l(:label_without_score) : stu.student_score.round(2)
sheet[count_row,10] = stu.absence_penalty
sheet[count_row,11] = stu.late_penalty
sheet[count_row,10] = home.teacher_priority == 1 ? 0 : stu.absence_penalty
sheet[count_row,11] = home.teacher_priority == 1 ? 0 : stu.late_penalty
sheet[count_row,12] = stu.work_score.nil? ? l(:label_without_score) : stu.work_score.round(2)
sheet[count_row,13] = format_time(stu.created_at)
else
sheet[count_row,9] = stu.late_penalty
sheet[count_row,9] = home.teacher_priority == 1 ? 0 : stu.late_penalty
sheet[count_row,10] = stu.work_score.nil? ? l(:label_without_score) : stu.work_score.round(2)
sheet[count_row,11] = format_time(stu.created_at)
end
@ -1369,12 +1369,12 @@ class CoursesController < ApplicationController
sheet[count_row,6] = stu.teaching_asistant_score.nil? ? l(:label_without_score) : stu.teaching_asistant_score.round(2)
if home.anonymous_comment ==0
sheet[count_row,7] = stu.student_score.nil? ? l(:label_without_score) : stu.student_score.round(2)
sheet[count_row,8] = stu.absence_penalty
sheet[count_row,9] = stu.late_penalty
sheet[count_row,8] = home.teacher_priority == 1 ? 0 : stu.absence_penalty
sheet[count_row,9] = home.teacher_priority == 1 ? 0 : stu.late_penalty
sheet[count_row,10] = stu.work_score.nil? ? l(:label_without_score) : stu.work_score.round(2)
sheet[count_row,11] = format_time(stu.created_at)
else
sheet[count_row,7] = stu.late_penalty
sheet[count_row,7] = home.teacher_priority == 1 ? 0 : stu.late_penalty
sheet[count_row,8] = stu.work_score.nil? ? l(:label_without_score) : stu.work_score.round(2)
sheet[count_row,9] = format_time(stu.created_at)
end

View File

@ -1230,12 +1230,12 @@ class StudentWorkController < ApplicationController
sheet1[count_row,8] = homework.teaching_asistant_score.nil? ? l(:label_without_score) : homework.teaching_asistant_score.round(2)
if @homework.anonymous_comment ==0
sheet1[count_row,9] = homework.student_score.nil? ? l(:label_without_score) : homework.student_score.round(2)
sheet1[count_row,10] = homework.absence_penalty
sheet1[count_row,11] = homework.late_penalty
sheet1[count_row,10] = @homework.teacher_priority == 1 ? 0 : homework.absence_penalty
sheet1[count_row,11] = @homework.teacher_priority == 1 ? 0 : homework.late_penalty
sheet1[count_row,12] = homework.respond_to?("score") ? homework.score.nil? ? l(:label_without_score) : homework.score.round(2) : l(:label_without_score)
sheet1[count_row,13] = format_time(homework.created_at)
else
sheet1[count_row,9] = homework.late_penalty
sheet1[count_row,9] = @homework.teacher_priority == 1 ? 0 : homework.late_penalty
sheet1[count_row,10] = homework.respond_to?("score") ? homework.score.nil? ? l(:label_without_score) : homework.score.round(2) : l(:label_without_score)
sheet1[count_row,11] = format_time(homework.created_at)
end
@ -1263,12 +1263,12 @@ class StudentWorkController < ApplicationController
sheet1[count_row,9] = homework.system_score.nil? ? l(:label_without_score) : homework.system_score.round(2)
if @homework.anonymous_comment ==0
sheet1[count_row,10] = homework.student_score.nil? ? l(:label_without_score) : homework.student_score.round(2)
sheet1[count_row,11] = homework.absence_penalty
sheet1[count_row,12] = homework.late_penalty
sheet1[count_row,11] = @homework.teacher_priority == 1 ? 0 : homework.absence_penalty
sheet1[count_row,12] = @homework.teacher_priority == 1 ? 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,14] = format_time(homework.created_at)
else
sheet1[count_row,10] = homework.late_penalty
sheet1[count_row,10] = @homework.teacher_priority == 1 ? 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,12] = format_time(homework.created_at)
end
@ -1292,12 +1292,12 @@ class StudentWorkController < ApplicationController
sheet1[count_row,5] = homework.teaching_asistant_score.nil? ? l(:label_without_score) : homework.teaching_asistant_score.round(2)
if @homework.anonymous_comment ==0
sheet1[count_row,6] = homework.student_score.nil? ? l(:label_without_score) : homework.student_score.round(2)
sheet1[count_row,7] = homework.absence_penalty
sheet1[count_row,8] = homework.late_penalty
sheet1[count_row,7] = @homework.teacher_priority == 1 ? 0 : homework.absence_penalty
sheet1[count_row,8] = @homework.teacher_priority == 1 ? 0 : homework.late_penalty
sheet1[count_row,9] = homework.respond_to?("score") ? homework.score.nil? ? l(:label_without_score) : homework.score.round(2) : l(:label_without_score)
sheet1[count_row,10] = format_time(homework.created_at)
else
sheet1[count_row,6] = homework.late_penalty
sheet1[count_row,6] = @homework.teacher_priority == 1 ? 0 : homework.late_penalty
sheet1[count_row,7] = homework.respond_to?("score") ? homework.score.nil? ? l(:label_without_score) : homework.score.round(2) : l(:label_without_score)
sheet1[count_row,8] = format_time(homework.created_at)
end