diff --git a/CHANGELOG.md b/CHANGELOG.md index 99e54cb..f406cfc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +### 0.3.2 (2019-02-21) + +* Disable duplicate questionnaire functionality for questionnaires which are already a result of a duplication. + ### 0.3.0 (2018-12-12) * Bugfixing diff --git a/app/controllers/questionnaires_controller.rb b/app/controllers/questionnaires_controller.rb index b04ddc2..92aeb9f 100644 --- a/app/controllers/questionnaires_controller.rb +++ b/app/controllers/questionnaires_controller.rb @@ -324,7 +324,9 @@ def respondents end def duplicate - @questionnaires = Questionnaire.find(:all, :include => [:questionnaire_fields, :user, :questionnaire_parts ]) + # Temporarily disable questionnaire duplication for + # questionnaires which have already been created from another one. + @questionnaires = Questionnaire.includes(:questionnaire_fields, :user, :questionnaire_parts).where(original_id: nil) @questionnaire = Questionnaire.new respond_to do |format| format.html diff --git a/app/views/questionnaires/duplicate.html.erb b/app/views/questionnaires/duplicate.html.erb index 410a73b..868155f 100644 --- a/app/views/questionnaires/duplicate.html.erb +++ b/app/views/questionnaires/duplicate.html.erb @@ -8,6 +8,9 @@
This page allows you to create new questionnaires from existing questionnaires. There is an option to copy not only the structure of the questionnaire, but its answers as well.
"-%>+ <%= fa_icon('info-circle', class: 'info-icon--blue') %> ORS does not currently support duplication of questionnaires that have already been duplicated. Please contact ORS_team@unep-wcmc.org for more information. +