このコミットが含まれているのは:
@@ -192,7 +192,10 @@ class GekanatorGamesController < ApplicationController
|
||||
answer_value = answer['answer'].to_s
|
||||
next if answer_value.blank? || answer_value == 'unknown'
|
||||
|
||||
question = accepted_questions[answer['question_id'].to_s]
|
||||
question_id = game_answer_question_id(answer)
|
||||
next if question_id.blank?
|
||||
|
||||
question = accepted_questions[question_id.to_s]
|
||||
next unless learnable_game_answer_question?(question)
|
||||
|
||||
example =
|
||||
@@ -251,6 +254,7 @@ class GekanatorGamesController < ApplicationController
|
||||
end
|
||||
|
||||
def learnable_game_answer_question? question
|
||||
return false if question.nil?
|
||||
return true if question.kind == 'post_similarity'
|
||||
return false unless question.kind == 'tag'
|
||||
|
||||
@@ -258,4 +262,11 @@ class GekanatorGamesController < ApplicationController
|
||||
key = condition[:key].to_s
|
||||
!key.start_with?('nico:')
|
||||
end
|
||||
|
||||
def game_answer_question_id answer
|
||||
answer['question_id'] ||
|
||||
answer[:question_id] ||
|
||||
answer['questionId'] ||
|
||||
answer[:questionId]
|
||||
end
|
||||
end
|
||||
|
||||
新しい課題から参照
ユーザをブロックする