|
|
@ -169,13 +169,12 @@ class EcCourseEvaluationsController < ApplicationController
|
|
|
|
else
|
|
|
|
else
|
|
|
|
score_count = @ce.evluation_count * length
|
|
|
|
score_count = @ce.evluation_count * length
|
|
|
|
EcStudentAchievement.where(:ec_course_evaluation_subitem_id => subitems.pluck(:id)).destroy_all
|
|
|
|
EcStudentAchievement.where(:ec_course_evaluation_subitem_id => subitems.pluck(:id)).destroy_all
|
|
|
|
score_type = worksheet.cell(2, score_count+1) && worksheet.cell(2, score_count+2) ? 1 : 2
|
|
|
|
score_type = worksheet.cell(1, 1) == "学号" ? 1 : 2
|
|
|
|
|
|
|
|
|
|
|
|
logger.info("####evluation_count: #{@ce.evluation_count}")
|
|
|
|
logger.info("####evluation_count: #{@ce.evluation_count}")
|
|
|
|
logger.info("####length: #{length}")
|
|
|
|
logger.info("####length: #{length}")
|
|
|
|
logger.info("####score_type: #{score_type}")
|
|
|
|
logger.info("####score_type: #{score_type}")
|
|
|
|
logger.info("####worksheet.cell(2, score_count+1): #{worksheet.cell(2, score_count+1)}")
|
|
|
|
logger.info("#### worksheet.cell(1, 1): #{ worksheet.cell(1, 1)}")
|
|
|
|
logger.info("####worksheet.cell(2, score_count+2): #{worksheet.cell(2, score_count+2)}")
|
|
|
|
|
|
|
|
if score_type == 2 && rows > 3
|
|
|
|
if score_type == 2 && rows > 3
|
|
|
|
render :json => {status: 0, message: "平均成绩只能有一行数据"}
|
|
|
|
render :json => {status: 0, message: "平均成绩只能有一行数据"}
|
|
|
|
else
|
|
|
|
else
|
|
|
|