You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
761 B
17 lines
761 B
3 years ago
|
module InteruptionScreenHelper
|
||
|
def display_informative_text(informative_text, case_log)
|
||
|
translation_questions = informative_text["argument"].map { |x| case_log.form.get_question(x) }
|
||
|
begin
|
||
|
case translation_questions.count
|
||
|
when 2
|
||
|
translation = I18n.t(informative_text["translation"], informative_text["argument"][0].to_sym => translation_questions[0].answer_label(case_log), informative_text["argument"][1].to_sym => translation_questions[1].answer_label(case_log))
|
||
|
when 1
|
||
|
translation = I18n.t(informative_text["translation"], informative_text["argument"][0].to_sym => translation_questions[0].answer_label(case_log))
|
||
|
end
|
||
|
rescue StandardError
|
||
|
return ""
|
||
|
end
|
||
|
translation.to_s.html_safe
|
||
|
end
|
||
|
end
|