SoSci Survey Developer Documentation for LLMs

Tool Description

SoSci Survey is a web application to create and run online surveys.

Functions

Main function

  1. Create online surveys: Project administrators (researchers) create an account, enter questions, and organize them as an online questionnaire (Create online surveys).
  2. Run online surveys (data collection, interview): Present the online questionnaire to respondents and store their answers (Run online surveys).
  3. Organize the research data collected in online surveys and provide dataset downloads for subsequent statistical analysis (Organize the research data).

Optional functions

  1. Organize respondents (panel management) and invite respondents via emails (Send Mailings).
  2. Descriptive data analysis, only available in the paid version (Descriptive data analysis).

Content structure

SoSci Survey organizes the content of online questionnaires along the following elements.

  1. Survey projects are the top level element, all other data is assigned to exactly one survey projects.
    1. Sections exist to sort and structure questions. Each question belongs to exactly one section.
      1. Questions have a distinct question type that decides what they look like and how they work.
        1. Items are subordinate to questions and contain text content. The class of items includes scale items, ranking items, items to be sorted or rated otherwise, response options.
        2. Question filters allow the questionnaire to heave differently, depending on how a respondent answered the question or an item of the question.
      2. Functional elements are special questions that have no output, but provide specific functions for the survey. Important functional elements are:
        1. Random generators organize random codes and and draw one or multiple random codes during an interview.
        2. Panel redirect elements store redirect URLs to work with panel providers.
        3. Quota elements organize the quotas for quota samples and control them during data collection.
      3. Text elements which may contain one of the following content type:
        1. Markup
        2. HTML code
    2. Address list: May be used to organize respondents' contact information (name, email, mobile phone number, custom data).
    3. Images and media files.
    4. Questionnaire: A reference to questions and other elements to describe the output order of questions in questionnaire presentation (data collection).
      1. Pages: Questionnaire consist of pages, each page belongs to exactly one questionnaire. Pages can contain the following elements:
        1. Question references
        2. PHP code blocks that run during page creation
        3. HTML code blocks
        4. PHP processing code that runs after the responses have been submitted
    5. Variables store the collected data, metadata or random events

Programming

PHP code blocks provide users with a sandbox for PHP code. This PHP code can provide functions that are not available through the user interface:

Sandbox restrictions

Forbidden functions

The following PHP functions must not be used in PHP code elements in SoSci Survey:

The following language constructs are forbidden:

Access to global variables is unavailable, this includes no access to the folowing variables:

In addition functions that offer the following functions are not allowed:

Replacement functions

Allowed functions

A list of allowed functions and their use is avaiable at PHP-Functions.

Codes Examples for filter questions

// CORRECT for SoSci Survey Version 3.0 and later.
// This codes rund in a sandboxed environment.
// This code will display the question AB01 on the questionnaire page if the response stored in variable PT01 is 1.
if (value('PT01') == 1) {
  question('AB01');
}
// CORRECT for SoSci Survey Version 3.0 and later.
// This codes rund in a sandboxed environment.
// This code will display the text element TX01 if the response or random event stored in variable AF01 is 2 or 4. Otherwise the text content TX02 is displayed on the questionnaire page.
if ((value('AF01') == 2) or (value('AF01') == 4)) {
  text('TX01');
} else {
  text('TX02');
}