添加试卷评阅页面的答案内容

dev_aliyun_beta
SylorHuang 5 years ago
parent ac065bb94d
commit 1773a4a49c

@ -36,6 +36,14 @@ if question.question_type <= 2 #当为选择题或判断题时,只显示选
if exercise_type == 1 || exercise_type == 4 #1为老师4为试卷截止且答案公开的情况
json.standard_answer standard_answers_array
if question.question_type == 2 #返回答案的文字
standard_text = standard_answers_array.first.to_i == 1 ? "正确" : "错误"
else
array_text_answer = []
standard_answers_array.each{|a| array_text_answer.push((a+65).chr)}
standard_text = array_text_answer.join("")
end
json.standard_answer_show standard_text
end
if exercise_type == 3 || exercise_type == 4
json.user_answer user_answer

Loading…
Cancel
Save