Generated: Monday, November 14, 2011, 09:19:32 Copyright © 2011 , Kurt NÝrmark The local LAML software home page

Manual of the LAML questionnaire facility

Kurt NÝrmark © normark@cs.aau.dk Department of Computer Science, Aalborg University, Denmark.

LAML 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 'IDquestion' 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 'IDanswers' 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.auc.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
feedback-message (feedback-message message) Define the feedback message, which appears when the questionnaire form is submitted.
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.
free-style-question-height free-style-question-height The height of an free-style question field (in terms of number of characters)
free-style-question-width free-style-question-width The width of an free-style question field (in terms of number of characters)
hidden-ids hidden-ids Hidden answers.
identification-question (identification-question id question) Ask a question which requires a one line answer.
identification-question-width identification-question-width The width of an identification question field (in terms of number of characters)
multi-choice-question (multi-choice-question id question possibilities) Ask a multi-choice question.
question-emphasis-function (question-emphasis-function q) Question emphasis function.
questionnaire (questionnaire title receiving-program-url questionnaire-id . question-list) Write a questionnaire to a file.
questionnaire-color-scheme questionnaire-color-scheme The questionnaire color scheme.
questionnaire-font-size questionnaire-font-size The font size of a questionnaire
questionnaire-self-contained questionnaire-self-contained Is 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

identification-question-width
Form identification-question-width
Description The width of an identification question field (in terms of number of characters)

free-style-question-width
Form free-style-question-width
Description The width of an free-style question field (in terms of number of characters)

free-style-question-height
Form free-style-question-height
Description The height of an free-style question field (in terms of number of characters)

question-emphasis-function
Form (question-emphasis-function q)
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 form free-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.

feedback-message
Form (feedback-message message)
Description Define the feedback message, which appears when the questionnaire form is submitted. Do NOT use the characters '{', '}', and '£' in the message. These characters are used for encoding purposes of embedded HTML anchor fragments - ad hoc stuff.


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: Monday, November 14, 2011, 09:19:32
Generated by LAML SchemeDoc using LAML Version 38.0 (November 14, 2011, full)