Installation and configuration

Index Introduction Requirements Features (Installation) Usage
 
Step 2: Create the main configuration file
All configuration files for the quiz system are Perl scripts that are executed from within the quiz script. This lets you enter the contents of the configurations in which order you wish.

The main configuration file affects only the quiz selection screen, and sets the default values for the rest of the screens. If you wish to override the settings in the main configuration, this can be done using the configuration files for the individual question databases.

The main configuration file's name is "config.pl", and should be placed in the same location as the "quiz.cgi" and "cgi-lib.pl" files. The following options are available, as of 27-nov-99 (shown with their default values):

Example main configuration:
    # -- files and directories
 1  $accesslog = "quiz_access_log";
 2  $questions = "questions";
 3  $sessions = "sessions";
 4  $markedimage = "images/marked.gif";
 5  $incompleteimage = "images/incomplete.gif";

    # -- color options (all screens) --
 6  $pbgcolor = "#000000";
 7  $tbgcolor = "#B0B0E0";
 8  $ttextcolor = "#000000";
 9  $qbgcolor = "#8E008E";
10  $qtextcolor = "#FFFFFF";
11  $abgcolor = "#B0B0E0";
12  $atextcolor = "#000000";

    # -- color options (question, and most review screens) --
13  $timeleftbarcolor = "green";
14  $timeusedbarcolor = "red";
15  $timetextcolor = "#000000";
16  $hilitecolor = "lightgreen";

    # -- color options (score report screen) --
17  $reqbartextcolor = "#000000";
18  $reqbarfillcolor = "blue";
19  $reqbaremptycolor = "white";

20  $yourbartextcolor = "#000000";
21  $yourbarfillcolor = "green";
22  $yourbaremptycolor = "white";

23  $scaletextcolor = "#000000";

24  $passscoretextcolor = "#000000";
25  $passscoreboxbgcolor = "#FFFFFF";
26  $passscoreboxtextcolor = "#000000";

27  $yourscoretextcolor = "#000000";
28  $yourscoreboxbgcolor = "#FFFFFF";
29  $yourscoreboxtextcolor = "#000000";

30  $gradetextcolor = "#000000";
31  $gradeboxbgcolor = "#FFFFFF";
32  $gradepasstextcolor = "green";
33  $gradefailtextcolor = "red";

34  $defpassingscore = 0;


Files and directories
All directory and file paths can be entered either as relative paths to the current directory (the location of the quiz script), or as absolute paths to locations anywhere on the hosting system.
Line in exampleDescription
1 If defined, it will enable logging to the quiz selection page. The log file will almost look like the logs created by the Apache web server. This enables you keep track of the script usage, even if you don't have access to the web server's logs.
2 This is the path to the directory that contains the directories with the configuration files for each question database that should be available on the first screen. To locate this directory outside the directory with the script, you could use an absolute path to this directory, or a relative path starting with "../" for each step upwards in the structure you want to put it.
3 This is the location where the session files, with the data for an ongoing test will be placed. You can put the session files anywhere where the user that runs the web server process has write access. This directory should be located outside the web server's public access directories for safety reasons (otherwise, someone with some CGI knowledge could just steal another user's session and continue on that one.
4 This is the name of the file containing the image to show on the the "Item Review" screen for marked questions.
5 This is the name of the file containing the image to show on the the "Item Review" screen for incomplete questions.
Color options (all screens)
All colors can be entered as RGB values or color names, as allowed in HTML code.
Line in exampleDescription
6 This is the color to be used as background color for the screens (outside the table with the contents of the screen).
7 This is the color to be used as background color in the top section of the screens.
8 This is the color to be used as text color the text in the top section of the screens.
9 This is the color to be used as background color for the "question" area of the screens.
10 This is the color to be used for the text in the "question" area of the screens.
11 This is the background color for the "answers" area of the screens.
12 This is the color to be used as text color for all text except the text in the "question" area of the screens. This should be limited to affect the text color in the "answers" area of the screens.
Color options (question screens and most review screens)
All colors can be entered as RGB values or color names, as allowed in HTML code.
Line in exampleDescription
13 This is the color to be used to fill the time counter with the remaining time to take the test.
14 This is the color to be used to fill the time counter with the used time for the test.
15 This is the color for the textual display of the remaining time to take the test.
16 This is the color used to hilite the correct answer, when pressing the "Show Answer" button, and when reviewing errors.
Color options (score report screen)
All colors can be entered as RGB values or color names, as allowed in HTML code.
Line in exampleDescription
17 This is the color the "Required Score" text at the left of the bar to represent the required score is printed in.
18 This is the color to used to fill the "Required Score" bar with (shows what score you must have to pass the test)
19 The rest of the required score bar is filled with this color.
20 This is the color the "Your Score" text at the left of the bar to represent your score is printed in.
21 This is the color to fill the "Your Score" bar with (shows your score graphically)
22 The rest of the "Your Score" bar is filled with this color.
23 This is the color the scale text below the score bars is printed in.
24 This is the color the "Passing Score:" text below the score scale is printed in.
25 This is the background color for the "Passing Score" box.
26 This is the text color for the "Passing Score" box.
27 This is the color the "Your Score:" text at the right of the "Passing Score" box is printed in.
28 This is the background color for the "Your Score" box.
29 This is the text color for the "Your Score" box.
30 This is the color the "Grade:" text at the right of the "Your Score" box is printed in.
31 This is the background color for the "Grade" box.
32 This is the text color used to print "Pass" in the "Grade" box.
33 This is the text color used to print "Fail" in the "Grade" box.
34 This is the default score required to pass a test, if not defined in the quiz configuration.
All settings in the main configuration file are optional, with decent default values if they are not set in by the configuration file.
Prev page Next page

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