From 4e267c22b34b34394099609b614fac5e644f12cb Mon Sep 17 00:00:00 2001 From: cxt Date: Tue, 1 Nov 2016 17:25:02 +0800 Subject: [PATCH] =?UTF-8?q?=E7=8F=AD=E7=BA=A7=E5=AD=A6=E7=94=9F=E5=88=97?= =?UTF-8?q?=E8=A1=A8-=E5=AF=BC=E5=87=BA=E5=88=97=E8=A1=A8=EF=BC=9A?= =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E7=A7=AF=E5=88=86=E7=BB=9F=E8=AE=A1=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/courses_controller.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index 6616c74ab..26e6fc095 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -1511,9 +1511,8 @@ class CoursesController < ApplicationController if student_works.empty? sheet1[count_row,j+4] = 0 else - final_score = student_works.first.final_score.nil? ? 0 : student_works.first.final_score - score = final_score - student_works.first.absence_penalty - student_works.first.late_penalty - sheet1[count_row,j+4] = score <0 ? 0:score.round(2) + work_score = student_works.first.work_score.nil? ? 0 : student_works.first.work_score + sheet1[count_row,j+4] = work_score <0 ? 0:work_score.round(2) end end hw_score = member.score.nil? ? 0 : member.score