试卷的多选题老数据转化错误

dev_aliyun_beta
SylorHuang 6 years ago
parent eaa09c625a
commit f72b948be5

@ -49,6 +49,9 @@ if question.question_type <= 2 #当为选择题或判断题时,只显示选
if question.question_type == 2 #返回答案的文字
standard_text = standard_answers_array.first.to_i == 1 ? "正确" : "错误"
else
if question.question_type == 1 && standard_answers_array.size == 1
standard_answers_array = standard_answers_array.first.split("")
end
array_text_answer = []
standard_answers_array.each{|a| array_text_answer.push((a+64).chr)}
standard_text = array_text_answer.join("")

Loading…
Cancel
Save