66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
# File 'app/models/effective/cpd_audit_response.rb', line 66
def response
return nil unless cpd_audit_level_question.present?
return date if cpd_audit_level_question.date?
return email if cpd_audit_level_question.email?
return number if cpd_audit_level_question.number?
return long_answer if cpd_audit_level_question.long_answer?
return short_answer if cpd_audit_level_question.short_answer?
return upload_file if cpd_audit_level_question.upload_file?
return cpd_audit_level_question_options.first if cpd_audit_level_question.choose_one?
return cpd_audit_level_question_options.first if cpd_audit_level_question.select_up_to_1?
return cpd_audit_level_question_options if cpd_audit_level_question.question_option?
raise('unknown response for unexpected cpd audit question category')
end
|