You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
educoder/app/views/games/get_answer_info.json.jbuilder

19 lines
381 B

6 years ago
index = 0
json.status 3
# st: 0 实践题 1 选择题
json.message do
json.array! @challenge_answers do |answer|
index += 1
json.answer_id answer.id
json.answer_name answer.name
json.answer_score answer.score
# 高层级不给答案
if @power || @game.answer_open >= index
json.answer_contents answer.contents
6 years ago
end
end
end