班级学生列表-导出列表:作业积分统计错误
This commit is contained in:
parent
cbfde6596d
commit
4e267c22b3
|
@ -1511,9 +1511,8 @@ class CoursesController < ApplicationController
|
||||||
if student_works.empty?
|
if student_works.empty?
|
||||||
sheet1[count_row,j+4] = 0
|
sheet1[count_row,j+4] = 0
|
||||||
else
|
else
|
||||||
final_score = student_works.first.final_score.nil? ? 0 : student_works.first.final_score
|
work_score = student_works.first.work_score.nil? ? 0 : student_works.first.work_score
|
||||||
score = final_score - student_works.first.absence_penalty - student_works.first.late_penalty
|
sheet1[count_row,j+4] = work_score <0 ? 0:work_score.round(2)
|
||||||
sheet1[count_row,j+4] = score <0 ? 0:score.round(2)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
hw_score = member.score.nil? ? 0 : member.score
|
hw_score = member.score.nil? ? 0 : member.score
|
||||||
|
|
Loading…
Reference in New Issue