The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

cgi-bin/survey.pl - dump out a questionnaire and record the results

SYNOPSIS

  cgi-bin/survey.pl [-C charset] [-f form] [-L language]
    [-r resultsfile] [-u url]

DESCRIPTION

The survey.pl program is a Common Gateway Interface (CGI) program used to provide a survey form to end users of a ROADS based subject service. The survey form is an HTML file that is presented to the end user by the program if it does not receive any CGI parameters. This form can include multiple choice questions, selections and questions requiring free text answers. When this form is submitted back to the program, the values of the CGI variables are saved in comma separated value format. This result file can then be processed offline by other programs to analyze the survey's returns. The link to the survey.pl program can be made from any of the other HTML in the ROADS system, such as that returned by the addsl.pl, addwn.pl search.pl programs.

ELEMENTS IN THE survey.pl FORM

The survey.pl program uses a HTML form normally called survey.html to read the HTML form for the survey in from. This file can contain any HTML. However, within the FORM there is an extra "fake" HTML tag that is required. This is the X-HANDLE tag which is replaced by an unique handle when the program returns the form to the end user. This fake tag MUST be present in the form as each IAFA-like template must have a unique handle.

It is also necessary to list all of the form fields which should be stored in the survey results file - in the order which they should appear in the file. This list should be stored in the hidden form field list, using commas to separate the fields.

OPTIONS

These options are only practically useful for debugging.

-C charset

Character set to use.

-f form

HTML form to return to end user.

-L language

Language to use.

-r

File to save survey results to.

-u

URL of the survey.pl program.

CGI VARIABLES

charset

Character set to use.

form

HTML form to return to end user. Note that only alphanumeric characters will be used.

language

Language to use.

FILES

logs/survey-results - the survey results themselves.

config/multilingual/*/survey/survey.html - default HTML form to return to end user.

config/multilingual/*/survey/done.html - HTML message to return to end user once the session is complete.

FILE FORMAT

In addition to the fields specified on the WWW form, the following fields will also be saved for each entry in the survey log :-

  * The time in UTC (GMT)
  * The HTTP user agent if available
  * The client machine's IP address
  * The value returned by the IDENT/AUTH server on the remote
      machine if available
  * The domain name of the remote machine if available

Typically domain name and IDENT lookups have to be configured on the WWW server which is running the survey.pl program. Note also that some browsers will withhold HTTP user agent information.

SEE ALSO

"addsl.pl" in bin, "addwn.pl" in bin, "search.pl" in cgi-bin

COPYRIGHT

Copyright (c) 1988, Martin Hamilton <martinh@gnu.org> and Jon Knight <jon@net.lut.ac.uk>. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

It was developed by the Department of Computer Studies at Loughborough University of Technology, as part of the ROADS project. ROADS is funded under the UK Electronic Libraries Programme (eLib), the European Commission Telematics for Research Programme, and the TERENA development programme.

AUTHOR

Jon Knight <jon@net.lut.ac.uk>