From 9873bffa7804b2b841ef2efb8cc518c179a75380 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 15 Aug 2019 14:25:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=93=E5=8D=B0=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/ec_course_evaluations_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/ec_course_evaluations_controller.rb b/app/controllers/ec_course_evaluations_controller.rb index a144c655..2d3c2d05 100644 --- a/app/controllers/ec_course_evaluations_controller.rb +++ b/app/controllers/ec_course_evaluations_controller.rb @@ -169,7 +169,7 @@ class EcCourseEvaluationsController < ApplicationController else score_count = @ce.evluation_count * length EcStudentAchievement.where(:ec_course_evaluation_subitem_id => subitems.pluck(:id)).destroy_all - score_type = worksheet.cell(1, 1) == "学号" ? 1 : 2 + score_type = worksheet.cell(1, 1) && worksheet.cell(1, 1).try(:strip) == "学号" ? 1 : 2 logger.info("####evluation_count: #{@ce.evluation_count}") logger.info("####length: #{length}")