Question Editor (Questionnaire Editor Interface)

Open the question editor at <ensemble root>/admin/question_editor.php and log in if necessary.

You will see a web page with two frames. The left frame displays the master list of questions and the right frame contains several web fields that can be used to submit a new question to the list. A pull-down menu can be used to view a specific question category in the question list. This is done by selecting the category, and clicking on the "submit" button at the top.

Question Types There are two types of multi-part questions that are currently supported. The types are called "multi-question" and "multi-title." Multi-question types involve one or two additional questions that depend on the first. For example, the following is a two part "multi-question:"

Are you trained in music theory? 

 If so, please describe your background:

In a "multi-question," the second question depends on the first, so they must appear together in a form, under the same question number. A "multi-title" question is treated quite differently. It involves multiple fields that are all answers to a single question. The following is an example of a "multi-title" question:

What instrument do you play and how often do you play it?

Instrument Frequency

The additional questions in a "multi-question" format and the fields of a "multi-title" format are both stored in the same way. In the question editor, these are referred to as additional parts of the question. The text of the additional questions and titles are stored in the "heading" field of the question list. You will notice that some of the rows in the question list have no question text and instead the text "(part #_)" appears. These records refer to titles of a "multi-title" question or additional questions to a "multi-question." If the heading format is "multi-title," you will notice that the heading fields for all parts of the question, including the first, have an entry. If the heading format for a question is "multi-question," the first question has no "heading" and all of the additional questions are stored in the "heading" field of the successive parts.

The process of creating a new question is detailed in the following steps. You will need to choose a data type for each question you submit. You should read the Data Types document before selecting a data type.

Creating a new question The following steps are all performed in the right frame of the Question Editor.

  1. If you are submitting a question that uses an enum type with a new set of values, you will want to create the new enum set before you start your question. Do this by clicking on the "Add a new enum type" link on the bottom. This will open a new window that will allow you to submit new enum types. When you are done, close the window and reload the Question Editor by placing the cursor at the end of the URL and typing "enter" or "return". Refreshing the screen might re-submit a past question.
  2. If you wish to create a "multi-question" or "multi-title" question, first select the number of parts at the top. The number corresponds to the number of questions (including the first) of a "multi-question" or number of fields of a "multi-title" question. Hit the "submit" button after you make a selection. If your question has only one part, you can skip this step.
  3. Enter the text of the question under "Question Text." If you are entering a "multi-question," this will be the question that will appear for the first part of the multi-question.
  4. Under "Question Category," select the category that the question belongs to.
  5. (multi-part questions only) Under "Heading Format," select either "multi-question" or "multi-title."
  6. Under response parameters, you will see fields for type, range, and default value. If you are entering a question with multiple parts, these fields will appear for each part. The heading field will additionally appear for multi-part questions.
  7. (multi-part questions only) In the heading field, enter the appropriate heading for that part. If this is a "multi-question" format, leave the heading to part 1 blank and enter the additional questions in the heading field of the successive parts. If this is a "multi-title" format, enter the titles for each part (including the first) in the heading field.
  8. Select the type of question in the pull-down menu. If this is a multi-part question, you will be able to choose a different type for each part. Follow this link for a description of the supported types.
  9. The range field is supported only for int16, int32, int64, and varchar types. If you are using one of the integer types, you may enter a range of allowable values separated by a "-" character. For instance, if you wish to only allow entries from 1 to 10, enter "1-10" (without the quotes). If you are using a varchar type, simply enter one integer value for the maximum length of the character string, (e.g. "20" for a varchar up to 20 characters, again without quotes). The range entry is not required and may be left blank. If it is left blank, the full range of integers for int16, int32, or int64 will be allowed and varchars will not have a limit (see the data types document for more information). Range is particularly useful for integers when used in conjunction with a "menu" or "radiogroup" html field type (see step 11).
  10. The "default" field is optional. Enter the default value without quotes, whether it is a string, number, or enumerated type. If a default value is entered, then it will be typed in if the html field type is text or textarea or selected if the html field type is menu, checkbox, or radiogroup.
  11. The html field type is optional. This allows the specification of how the entry will appear on the form. The list of allowable data types for each html field type is listed in the menu. Each data type has a default html field type associated with it. If an incompatible html field type is selected, the default type will be used. Please see the data types document for a description of the html field types.
  12. If you wish to require that the question be answered before allowing the subject to move on to the next form, select "T" (for true) next to the "Required" label. Otherwise, select "F" for false. "T" is the default.
  13. Once all of your entries have been made, look them over to make sure that they are correct. Click on the "Submit" button at the bottom to submit the question to the master question list.
  14. Inspect the question list in the left frame to see if the question and its corresponding parts have been correctly submitted.

Deleting Questions The delete column of the question list contains checkboxes that allow the deletion of a question. If forms have already been generated, you will notice that some of the questions display "locked" in the field instead of containing a checkbox. This indicates that the question has already been used in a generated form and is protected from deletion. Deleting the first part to a multi-part question will delete all of the parts to that question.

To delete a question, simply select the checkbox in the delete field and click "Delete Selected Questions" at the bottom of the list. Multiple questions may be deleted at the same time.

If you are ready to create a new form using the question(s) you just created or questions that are currently in the list, visit the Form Editor documentation to learn how to create a form.

bottom corner