A
<% case sq.type %>
<% when SurveyQuestion::Radio, SurveyQuestion::Select %>
<%= @survey_answer[sq.id.to_s] rescue "" %>
<% when SurveyQuestion::Check %>
<%= @survey_answer[sq.id.to_s].join(", ") rescue "" %>
<% when SurveyQuestion::Radiogroup %>
<% sq.survey_question_options.each do |sqo| %>
<% if !@survey_answer[sq.id.to_s].nil? %>
<% if sq.custom_option %>
<%= @survey_answer[sq.id.to_s]["#{sqo.id}_custom_group_field"].blank? ? sqo.name : @survey_answer[sq.id.to_s]["#{sqo.id}_custom_group_field"] %> : <%= @survey_answer[sq.id.to_s][sqo.id.to_s] %>
<% else %>
<%= sqo.name %> : <%= @survey_answer[sq.id.to_s][sqo.id.to_s] %>
<% end %>
<% end %>
<% end %>
<% when SurveyQuestion::Oneline, SurveyQuestion::Multiline %>
<%= @survey_answer[sq.id.to_s] rescue "" %>
<% end %>