Generated: August 17, 2001, 10:31:22Copyright © 2000, Kurt NørmarkThe local LAML software home page

Manual of the LAML questionnaire facility

Kurt Nørmark ©    normark@cs.auc.dk    Department of Computer Science    Aalborg University    Denmark    

Source file: styles/questionnaire/questionnaire.scm

This is a LAML questionnaire style. It is based on the html4.0-loose libraries. The main function is questionnaire. Besides this function and its helping functions, a collection of useful quetionnaire functionality is collected in this style; Some of these are used in the accompanying cgi programs. A submitted questionnaire can be self-contained if you want; It means that the questions and possible answers are submitted too via hidden lines. The cgi programs rely on self contained submissions. If a questions is identified with 'ID, the field 'ID$question' denotes the formulation of the question. In case of multi-choice-question, single-choice-question, and rating-question the questions themselves are submitted via hidden input lines with the answering possibilities submitted as 'ID$answers' in a particular encoding.

The cgi programs in cgi-support (a subdirectory of the containing directory - not part of the LAML distribution) holds a number of accompanying cgi programs which can accept and display submissions. If you are interested in this part of the work, please contact normark@cs.aucd.dk.

Important: Avoid the character '$' in both questions, answers, and ids.

Please consult the example questionnaire for further information and insight.

Table of Contents:
1. Front matters.2. Questionnaire forms.3. CGI relevant stuff.

Alphabetic index:
answer-box(answer-box txt)Show txt in a colored answer box
format-answer(format-answer answer-record id type)Return a formatted answer with id and type.
free-style-question(free-style-question id question)Ask a question which requires a multi-line answer.
hidden-idshidden-idsHidden answers.
identification-question(identification-question id question)Ask a question which requires a one line answer.
multi-choice-question(multi-choice-question id question possibilities)Ask a multi-choice question.
question-emphasis-functionquestion-emphasis-functionQuestion emphasis function.
questionnaire(questionnaire title receiving-program-url questionnaire-id . question-list)Write a questionnaire to a file.
questionnaire-color-schemequestionnaire-color-schemeThe questionnaire color scheme.
questionnaire-font-sizequestionnaire-font-sizeThe font size of a questionnaire
questionnaire-self-containedquestionnaire-self-containedIs the submitted questionnaire self contained?
rating-question(rating-question id question rating-list)Ask a rating question.
show-an-answer(show-an-answer answer-record)Present the answer in answer-record
single-choice-question(single-choice-question id question possible-answers)As a question which can be answered by choosing one answer among a selection of possible answers.
syn-con(syn-con . constituents)Return a symbol assembled from constituents

 

1.   FRONT MATTERS.
The functions and variables in this section are front matters to the real questionnaire.


hidden-ids



Form
hidden-ids

Description
Hidden answers. In some situations we might want (in an adhoc fashion) to hide certain answers. The answers to the questions ids in hidden-ids are not shown. Intial value is the empty list.


questionnaire-self-contained



Form
questionnaire-self-contained

Description
Is the submitted questionnaire self contained?


questionnaire-color-scheme



Form
questionnaire-color-scheme

Description
The questionnaire color scheme. A list of four colors: background, foreground, link, visited links colors.


questionnaire-font-size



Form
questionnaire-font-size

Description
The font size of a questionnaire


question-emphasis-function



Form
question-emphasis-function

Description
Question emphasis function. This function is applied on any question text.


 

2.   QUESTIONNAIRE FORMS.
In this section you will find the top-level questionnaire form together with possible subforms.


questionnaire



Form
(questionnaire title receiving-program-url questionnaire-id . question-list)

Description
Write a questionnaire to a file. The title is the title of the questionnaire. receiving-program-url is the URL of the CGI program which processes the answers. questionnaire-id is a symbol which identifies this particular questionnaire. The question-list is a number of forms: identification-question, free-style-question, multi-choice-question, rating-question.


identification-question



Form
(identification-question id question)

Description
Ask a question which requires a one line answer. The answer to this question is meant to identify a particular answer relative to other answers. Thus, typically ask for the name of the submitter in an identification question. Id is the identification of this question (a symbol).

See also
Alternative formfree-style-question    


free-style-question



Form
(free-style-question id question)

Description
Ask a question which requires a multi-line answer. The id is the identification of this question (a symbol).


multi-choice-question



Form
(multi-choice-question id question possibilities)

Description
Ask a multi-choice question. Possibilities is a list of possible answers. One or more answers can be selected. The id is the identification of this question (a symbol).


rating-question



Form
(rating-question id question rating-list)

Description
Ask a rating question. The question can be answered by selecting exactly one of answers presenting in the rating-list. Gives entry ("id" . "n"), where n is the entry selected. The first is number 1. The id is the identification of this question (a symbol). Rating-list is a list of strings.


single-choice-question



Form
(single-choice-question id question possible-answers)

Description
As a question which can be answered by choosing one answer among a selection of possible answers. Same form as rating question. However, the ordering of the answers is not important for single-choice-question.


 

3.   CGI RELEVANT STUFF.
In sub-directory cgi-support of the directory holding the questionnaire.scm file, there is a number of CGI Scheme programs, which accepts answers and display the results of the questioning It is up to the administrator of the questionnaire facility (the LAML installer) to arrange that actual cgi programs are set up in an appropriate cgi-bin directory. These actual CGI programs can just load the Scheme programs in cgi-support.

The CGI stuff is not part of the LAML distribution.


answer-box



Form
(answer-box txt)

Description
Show txt in a colored answer box


syn-con



Form
(syn-con . constituents)

Description
Return a symbol assembled from constituents


format-answer



Form
(format-answer answer-record id type)

Description
Return a formatted answer with id and type.


show-an-answer



Form
(show-an-answer answer-record)

Description
Present the answer in answer-record


Generated: August 17, 2001, 10:31:22
This documentation has been extracted automatically from the Scheme source file by means of the Schemedoc tool