Views

Documentation

From PHP Online Survey Infrastructure

POSI is very poorly documented. Good luck.


Contents

Admin notes

Inserting new questions

When inserting a new question before the end of the survey, the question table and the branching table must be updated in various ways.

In the following SQL statements:

  1. X = qnum of the new question,
  2. Y = number of datapoints in new question


[abi] Note: new version of POSI may label field branch_begin instead of skip_begin (ben i updated your sql statement which had said use question_begin)

[ben] Any more?


MySQL Logging

One is highly encouraged to turn on query logging on the SQL server.

MySQL General Query Log


Installation

  1. If you have an existing installation of posi at the same location, ensure it's directory name is not 'posi' or it will get overwritten when untarring *
  2. incompatibility with older version databases as field names changed (field css_class removed from _survey table; skip_begin and skip_end changed to branch_begin and branch_end in _branching table; history_next added to _results table)
  1. need instructions for multiple surveys ie can share /includes directory but each need their own config.php and /admin?
  1. Update SURVEY_TITLE, and turn display to true
  2. Define admin email
  3. Define MYSQL connection settings (host, user, password and database)
  4. Need to comment out MSG_SURVEY_CLOSED define line
  1. update the .htaccess file for your system


Background

DB and File Structure

There are three tables for POSI

  1. {name}_branching = contains all instructions for question movement and skipping
  2. {name}_survey = contains all the questions text, answer values, header text
  3. {name}_results = contains a field for each datapoint in the survey

There are three main files for POSI

  1. class_admin.php
  2. class_question.php
  3. class_survey.php

Survey Table

There are several types of questions utilized by POSI:

  1. list_check
  2. list_radio
  3. mc_radio
  4. mc_check
  5. number
  6. other
  7. text
  8. textarea
  9. display

scale_heading

The field scale_heading adds a "scale" above a list of answers. Typically it is used on list_radio and list_check questions, but can also be used on mc_radio and mc_check where answer_column_newrow=0.

It is a series of php arrays, seperated by two semi-colins (;;).

So like:

array( text => "extremely flexible", colspan => "2", align => "left");;array( text => "no changes permitted", colspan => "3", align => "right")

javascript

example:

onClick="if (this.value==3 || this.value==4) { hideshow('s49','visible'); } else { hideshow('s49','hidden'); }"

Results Table

There are two field definitions:

  1. smallint(5)unsigned binary - list radio, mc_radio, list_checkbox, mc_checkbox
  2. varchar(255) - textarea, display

Branching Table


Bugs

See Bugs.


CHANGELOG

See CHANGELOG.