|
|
@ -226,14 +226,15 @@ class GamesController < ApplicationController
|
|
|
|
# 0 直接查看答案, 1 查看答案弹框, 2 答案详情弹框
|
|
|
|
# 0 直接查看答案, 1 查看答案弹框, 2 答案详情弹框
|
|
|
|
def get_answer_info
|
|
|
|
def get_answer_info
|
|
|
|
@challenge = @game.challenge
|
|
|
|
@challenge = @game.challenge
|
|
|
|
@challenge_answers = if @challenge.st == 0
|
|
|
|
if @challenge.st == 0
|
|
|
|
@challenge.challenge_answers
|
|
|
|
@challenge_answers = @challenge.challenge_answers
|
|
|
|
else
|
|
|
|
else
|
|
|
|
result = []
|
|
|
|
result = []
|
|
|
|
@challenge.challenge_chooses.each do |choose|
|
|
|
|
@challenge.challenge_chooses.each do |choose|
|
|
|
|
result << {:position => choose.position, :answer => (choose.answer.blank? ? choose.standard_answer : choose.answer)}
|
|
|
|
result << {:position => choose.position, :answer => (choose.answer.blank? ? choose.standard_answer : choose.answer)}
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
@challenge_answers = result
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 平台已认证的老师需要控制
|
|
|
|
# 平台已认证的老师需要控制
|
|
|
|