====== Change the Questionnaire During the Survey ======

In an ideal world, a questionnaire is created, tested and then the survey can begin. Nevertheless, subsequent changes to the questionnaire cannot always be avoided completely -- whether it be correcting a spelling mistake, or an important answer or answer option is missing. 

**Note:** This chapter explains the __technical__ side to making later changes. From a __methodological__ point of view, each change can alter response behaviour -- on subsequent questions as well. Therefore, each change must be checked on a case-by-case basis to see to what extent the data is comparable before and after the change. In order to guarantee scientific traceability, the date/time of any changes made during data collection should always be recorded.

**Note:** Download the data collected up to this point __before__ making any changes. If the worst comes to worst, this means that no data will be lost.

===== Changes in the Text =====

Normally, changing the text (in particular, correcting spelling mistakes) is not a problem. It does not matter whether changes are made to the question title, item text or text elements: there is no change to the variable structure as a result. 

Usually, the survey is not interrupted. After saving the change, the participant sees the amended version. 

**Warning:** __Do not__ change the text by entering new questions/items and deleting the old version. The data collected with the question up to now will no longer be available (see below). If you do not want to show an existing item in the questionnaire anymore, you can put a tilde (''~'') in front of the respective item. 

**Note:** Only the answer code is saved in the data record -- not the item text displayed (e.g. the selection option shown). If you want to change a selection option's text, you cannot directly differentiate afterwards in the data record up to what data record a participant selected the old option and from when the new one was selected. It always looks as if all participants have seen the last version of the questionnaire in the data record. Of course, you can indirectly track the time of the questionnaire: in order to do so, you have to note the time the change was made manually. 

===== Changes to the Questionnaire =====

**Problem 1:** When changing the questionnaire itself -- changing the order of questions or pages, inserting or removing questions, changing the presentation of the question ({{:button.settings.png?nolink|settings}}) -- all changes are saved immediately. This is also true when changes are made to PHP code elements: these are saved while typing, and in some cases do not work until changes are finished.  

**Problem 2:** If you insert new pages or shuffle pages around, then the allocation of the page number to the  recorded dwell time (TIME001 etc., [[:en:results:variables#dwell_times|Response Times]]) is no longer correct. If a page is given the number 2 initially, and (because another page was inserted before it), is then number 3 after the change, the dwell time is saved in TIME003. However, the old dwell time still remains in TIME002.  

If there are more significant changes to be made in the questionnaire (especially to the PHP code), making a copy of the questionnaire beforehand is recommended (**Compose Questionnaire** -> tab //Further questionnaires// -> duplicate button {{:button.copy.gif?nolink|Duplicate Questionnaire}}). Afterwards, ensure that the questionnaire used up to this point is set as default in //Default Questionnaire / Random selection for questionnaires//.

Changes can now be made in the copy in peace and quiet. After the changes are complete, set the new questionnaire as default (**Compose Questionnaire** -> tab //Further questionnaires// ->  //Default Questionnaire / Random selection for questionnaires//). Once this is saved, new questionnaires will use the revised version.

**Note:** The questionnaire is everything you defined in **Compose Questionnaire**. If you copy one questionnaire, the questions used in it are __not__ duplicated. Each change in the List of Questions is applicable to all questionnaires. 

===== Add Questions, Items, Selection Options =====

New questions or items/selection options can be created at anytime. Selection options and items appear in the questionnaire directly after saving -- questions still have to be initially dragged and dropped onto the respective page.


===== Do Not Delete Anything in the List of Questions =====

There are some changes that should, __under no circumstances__, be carried out after data collection has begun:

  * Deleting a question from the List of Questions\\ Along with the question, all variables belonging to it will also be deleted. Data collected with the question up to this point is therefore no longer traceable and can no longer be assigned.
  * Deleting items from the List of Questions\\ The same goes for items: if an item is deleted, the data collected for this item up to this point is no longer stored in the data record. Instead of deleting an item, hide it by putting a tilde (''~'') before the item text.
  * Deleting answer options\\ Depending on whether it concerns a multiple-choice selection or a simple selection, the variables or the coding for the deleted forms are no longer there once deleted. Just as for items, answer options can also be hidden by putting a tilde (''~'') in front of them.
  
**Note:** If a question or an item is deleted, it is no use creating a new question or item with the  same ID and/or same content. The new question or item with the same ID also saves data independently of the old element. 

**Note:** If you have accidentally deleted an item or a question, there is still one last chance to save the data. In [[:en:results:download#variablen-auswahl|Download Data]] you can determine in the //Selection of Variables// that the data for deleted variables should be downloaded as well. __However__, this data not longer has a question or item ID and you have to then guess which data originally belonged to which question or item. 

===== Do Not Change the Type of Question =====

If you want to stay on the safe side, do not change the type of question anymore after data collection has begun. For example, changing the type from "selection" to "multiple-choice selection" leads to not being able to find the data belonging to the original question -- and if you have allowed open answers ("Other"), the input appears there, where codes ''1'' and ''2'' for the multiple choice selection should actually be.

**Solution:** Make a copy of the question. You can carry out all the changes necessary in the copy (pay attention to the question ID!) Afterwards, swap the question in the **List of Questions** (see above).
