课程的考核和数据来源中,使用明细成绩模板导入成绩,报平均成绩只能1行的错误

dev_aliyun
daiao 6 years ago
parent 9873bffa78
commit abe242b1c0

@ -171,10 +171,6 @@ class EcCourseEvaluationsController < ApplicationController
EcStudentAchievement.where(:ec_course_evaluation_subitem_id => subitems.pluck(:id)).destroy_all
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}")
logger.info("####score_type: #{score_type}")
logger.info("#### worksheet.cell(1, 1): #{ worksheet.cell(1, 1)}")
if score_type == 2 && rows > 3
render :json => {status: 0, message: "平均成绩只能有一行数据"}
else

Loading…
Cancel
Save