Installation and configuration

Index Introduction Requirements Features (Installation) Usage
 
Step 4: Create the quiz configuration file
All color settings in the main configuration can be overridden by setting them in the configuration file for the quiz. Also, the images for the "Marked" and "Incomplete" questions can be set for each quiz individually. It is also possible to use another path for the session files for each quiz. The "$accesslog" and the "$questions" variables are disallowed, but not ignored in a quiz configuration file.

There are some new options available (and also required) for the quiz configuration:

Example quiz configuration:
    # -- required configuration directives (no defaults)
 1  $quizdb = "demo";
 2  $quizdesc = "Demo questions";
 3  $quizinfo = 'Some demonstration questions to be used with the quiz system';

    # -- optional directives
 4  $minq = 1;
 5  $maxq = 4;
 6  $passingscore = 75;
 7  $defuseq = 4;
 8  $quiztime = 0;

    # -- directives without defaults
 9  $quizaccfile = "../quizpasswd";
10  $demominq = 1;
11  $demomaxq = 10;
12  $demotime = 5;
13  $shuffleans = 0;
14  $bigdb="questiondb";

    # -- logging options
15  $quizaccesslog = "quizdata/logs/quiz_access";
16  $logformat = &get_date_time() . $input{'userid'} . "\n";



Required configuration
Line in exampleDescription
1 This variable sets the location of the question files that belongs to this question database. If you choose to put the questions in another directory than the one that the configuration file is in, you also have to copy the config file to this directory. If the questions path is written without a "/" at the start, the location is relative to the $questions directory in the main configuration file.
2 This is a short description of the contents of the question database, to be shown in the title of some screens.
3 This is the long description of the contents of the question database. Some HTML tags are allowed within this description (text styles and simple tables, with only <TD>'s without parameters, to keep the coloring of the text inside the "question area" of the screen).
Optional configuration
Line in exampleDescription
4 The lowest question number to use for the quiz. Can be used to separate different areas of the same test (chapters) by using the same directory for the questions, but more than one directory with configurations inside the $questions directory. If not set, the default value of 1 will be used.
5 The highest question number to use for the quiz. Can be used to separate different areas of the same test (chapters) by using the same directory for the questions, but more than one directory with configurations inside the $questions directory. If not set, the default value will be set to the number of question files in the $quizdb directory.
6 The score required to pass the test. This value is for the moment required to be reprecented in a percent value. The default value is 0, but is overridden by the $defpassingscore value in the main configuration.
7 This sets the default number of questions to use when taking the test. If not given, the number will be the same as the number of available questions.
8 This sets a time limit (in minutes) to complete the test within. For now, this setting only shows the time counter when taking the test, but does not cancel the session even if the time is up. Without setting this value, the default will be 0, which means unlimited time.
Directives without defaults
Line in exampleDescription
9 The quiz access file. This file is in the same format as the one that Apache's 'htpasswd' command creates (username:encrypted_password).
10 The lowest question number to use for the demo mode.
11 The highest question number to use for the demo mode.
12 The time limit for the demo mode.
13 This could be set to either 0 or 1 if you want to give the user the option to shuffle the answers around a bit. If set to "1", the "Shuffle Answers" checkbox will be initially selected on the options screen.
14 If this setting exists, the quiz system will use a single file containing the questions, instead of one file per question. This should be set to the name of the file containing the questions. The path to the file is relative to the location of the configuration file for the quiz.
15 This setting is used to tell the system to log all authorized access (the logging takes place when the first question is shown). The default log format is an Apache-style access log, but can be freely configured with the $logformat directive.
16 By setting this variable, you can create your own custom logs that are written when the first question is shown. You are free to use any of the functions and variables in Perl and the Quiz system. Some examples of the more useful variables will be available soon.
Prev page Next page

Quizzer and its documentation is Copyright © 1999, 2000 by P-O Yliniemi