diff --git a/app/assets/javascripts/admin.js b/app/assets/javascripts/admin.js index c0aac55..45e9f4e 100644 --- a/app/assets/javascripts/admin.js +++ b/app/assets/javascripts/admin.js @@ -129,9 +129,10 @@ } }); $('#phases_select').show(); - $('#versions_select').hide(); - $('#sections_select').hide(); - $('#questions_select').hide(); + //$('#versions_select').hide(); + //$('#sections_select').hide(); + //$('#questions_select').hide(); + return false; }); $('#phases_select').change(function() { @@ -143,10 +144,11 @@ phase_id : $('#phases_select').val() } }); - $('#phases_select').show(); + //$('#phases_select').show(); $('#versions_select').show(); - $('#sections_select').hide(); - $('#questions_select').hide(); + //$('#sections_select').hide(); + //$('#questions_select').hide(); + return false; }); $('#versions_select').change(function() { $.ajax({ @@ -157,10 +159,11 @@ version_id : $('#versions_select').val() } }); - $('#phases_select').show(); - $('#versions_select').show(); + //$('#phases_select').show(); + //$('#versions_select').show(); $('#sections_select').show(); - $('#questions_select').hide(); + //$('#questions_select').show(); + return false; }); $('#sections_select').change(function() { $.ajax({ @@ -171,9 +174,9 @@ section_id : $('#sections_select').val() } }); - $('#phases_select').show(); - $('#versions_select').show(); - $('#sections_select').show(); + //$('#phases_select').show(); + //$('#versions_select').show(); + //$('#sections_select').show(); $('#questions_select').show(); }); diff --git a/app/models/exported_plan.rb b/app/models/exported_plan.rb index 6d21897..68fe5bf 100644 --- a/app/models/exported_plan.rb +++ b/app/models/exported_plan.rb @@ -84,7 +84,7 @@ answer = self.plan.answer(question.id) options_string = answer.options.collect {|o| o.text}.join('; ') - csv << [section.title, question.text, sanitize_text(answer.text), options_string, answer.try(:user).try(:name), answer.created_at] + csv << [section.title, sanitize_text(question.text), sanitize_text(answer.text), options_string, answer.try(:user).try(:name), answer.created_at] end end end @@ -97,7 +97,8 @@ output += "\n#{section.title}\n" self.questions_for_section(section).each do |question| - output += "\n#{question.text}\n" + qtext = sanitize_text( question.text.gsub(/
- <%= question.text %>
+- <%= raw question.text %>