Questionnaire
-------------

The questionnaire, like much of Pbox, is built around databases.
The questionnaire program uses a "questions" database to work out what to ask,
and an "answers" database to hold the results.
The questions database holds the questions to ask, the type of answer expected,
a prompt to show for confirmation, and flags indicating how to post-process
the answer given.
The answers database has one record per respondent and one field per question.
It is the sysops responsibility to make sure there are the right number of
fields, and the fields are the right type to hold the answers!
The supplied example allows for up to 30 questions, each returning a string
response, maximum 80 characters long.
Within the questions, a backslash (\) is used to force a newline.

The questionnaire program starts with question 1, and goes through each
question in turn. Following a yes/no answer, or a number answer (types 2 and
3), the program can go to different questions depending on the answer to the
previous question. This saves answering irrelevant questions.
An answer of 0, or 'No' goes to the False question, all others go to True.
The questionnaire stops when it gets to the last question, or is asked to goto
a non-existent question. If you simply want to go to the next question, a
true/false value of zero can be used.

There are 10 types of "question" allowed
0. This asks for confirmation of the messages between the "False" and "True"
   question numbers, and puts you back to the "False" question if you want
   to change one or more answers.
1. This question type expects just a keypress to say you have read the prompt
2. This expects a Yes/No answer (in the users language)
3. This expects a plain number (made up of digits only)
4. This expects a phone number (0 to 9, plus +()- and space)
5. This expects 0 to 9, a to z, plus space
6. This expects a to z plus space
7. This allows any character from space to copyright (32 to 127)
8. This expects a date in the format dd/mm/yy, the '/' are entered for you
9. This expects a single digit answer, and can be used in conjunction with
   True/False choices to select from a list, 0 -> false, 1 to 9 -> true

Post-processing codes can be any combination of....
A  Convert yes/no to 1 for true, 0 for false
B  Make string upper case (eg for postcodes)
C  Make string mixed case (eg for names)
D  Repeat the question if no answer is supplied

Following completion of the questionnaire, the user can have additional
mail groups, file groups, time per day, downloads per day, by setting
variables in system dat. These can begin with + to add extra facilities
and Q_TMPD and Q_DNPD can begin with * to multiply by a factor.
Neither + nor * is used to set a completely new value
eg Q_TMPD = *2 gives users who answer the questionnaire twice as much time
as those who haven't answered it.
Q_MGRP = +G  adds group g
Q_FGRP = ABC changes file groups to ABC
Leave the strings undefined if you don't want automatic privelege enhanacements
and change the text messages to match.
