|
|
@ -448,9 +448,10 @@ private |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def reset_not_routed_questions |
|
|
|
def reset_not_routed_questions |
|
|
|
|
|
|
|
enabled_questions = form.enabled_page_questions(self) |
|
|
|
|
|
|
|
enabled_question_ids = enabled_questions.map(&:id) |
|
|
|
|
|
|
|
|
|
|
|
form.invalidated_page_questions(self).each do |question| |
|
|
|
form.invalidated_page_questions(self).each do |question| |
|
|
|
enabled_questions = form.enabled_page_questions(self) |
|
|
|
|
|
|
|
enabled_question_ids = enabled_questions.map(&:id) |
|
|
|
|
|
|
|
if %w[radio checkbox].include?(question.type) |
|
|
|
if %w[radio checkbox].include?(question.type) |
|
|
|
enabled_answer_options = enabled_question_ids.include?(question.id) ? enabled_questions.find { |q| q.id == question.id }.answer_options : {} |
|
|
|
enabled_answer_options = enabled_question_ids.include?(question.id) ? enabled_questions.find { |q| q.id == question.id }.answer_options : {} |
|
|
|
current_answer_option_valid = enabled_answer_options.present? ? enabled_answer_options.key?(public_send(question.id).to_s) : false |
|
|
|
current_answer_option_valid = enabled_answer_options.present? ? enabled_answer_options.key?(public_send(question.id).to_s) : false |
|
|
|