Project

General

Profile

Questionnaire Structure » History » Version 1

Lukas Vonlanthen, 02 Aug 2018 14:35

1 1 Lukas Vonlanthen
h1. Questionnaire Structure
2
3
h2. Terminology
4
5
* *Questionnaire Data* (how the data of a questionnaire is saved in the DB and submitted to the API)
6
* *Questionnaire Configuration* (how the questionnaire is built, which questions are available in which categories etc.)
7
* *Questiongroup*: A group of questions belonging together. Example: Image, Caption, Location, Name of photographer. Questiongroups can be repeated, for example if multiple Images are available.
8
9
h2. Questionnaire Data
10
11
* The entire data of a questionnaire is stored in a single JSON field in the database.
12
* The format is as flat as possible: It contains questiongroups and questions (no categories or other Questionnaire Configuration data)
13
* Sample 1: Questionnaire Data, shortened and with comments (in Python syntax)
14
* Sample 2: Questionnaire Data, complete in JSON
15
16
h2. Questionnaire Configuration
17
18
* The configuration of a questionnaire consists of multiple levels:
19
20
  * @sections@ (actually not used anymore)
21
22
    * @categories@ (Example: 1. General information)
23
24
      * @subcategories@ (Example: 1.1 Name of the SLM Technology (hereafter referred to as the Technology))
25
26
        * @questiongroups@ (Example: Name and Locally used name) - not always directly visible in the form
27
28
          * @questions@ (Example: Name)
29
30
* The structure of the Questionnaire Configuration can be extracted using a management command (under development). This might eventually become an API endpoint at one point?
31
* Sample: Questionnaire Configuration of Technologies form, edition 2015.
32
33
34
h2. API Endpoint to create Questionnaires
35
36
* Accepts data in the *Questionnaire Data* format.
37
* Validates the data, creates links to other models (e.g. users) and saves a new questionnaire.
38
* Needs to be created.