| 1 | #!perl |
1 | #!perl |
| 2 | ################################################################################ |
2 | ################################################################################ |
| 3 | # WeBWorK Online Homework Delivery System |
3 | # WeBWorK Online Homework Delivery System |
| 4 | # Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/ |
4 | # Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/ |
| 5 | # $CVSHeader: webwork-modperl/conf/global.conf.dist,v 1.86 2004/07/08 15:23:28 gage Exp $ |
5 | # $CVSHeader: webwork-modperl/conf/global.conf.dist,v 1.87 2004/07/10 16:05:51 sh002i Exp $ |
| 6 | # |
6 | # |
| 7 | # This program is free software; you can redistribute it and/or modify it under |
7 | # This program is free software; you can redistribute it and/or modify it under |
| 8 | # the terms of either: (a) the GNU General Public License as published by the |
8 | # the terms of either: (a) the GNU General Public License as published by the |
| 9 | # Free Software Foundation; either version 2, or (at your option) any later |
9 | # Free Software Foundation; either version 2, or (at your option) any later |
| 10 | # version, or (b) the "Artistic License" which comes with this package. |
10 | # version, or (b) the "Artistic License" which comes with this package. |
| … | |
… | |
| 17 | |
17 | |
| 18 | # This file is used to set up the default WeBWorK course environment for all |
18 | # This file is used to set up the default WeBWorK course environment for all |
| 19 | # requests. Values may be overwritten by the course.conf for a specific course. |
19 | # requests. Values may be overwritten by the course.conf for a specific course. |
| 20 | # All package variables set in this file are added to the course environment. |
20 | # All package variables set in this file are added to the course environment. |
| 21 | # If you wish to set a variable here but omit it from the course environment, |
21 | # If you wish to set a variable here but omit it from the course environment, |
| 22 | # use the "my" keyword. The following variables are available to this file: |
22 | # use the "my" keyword. The following variables are set in the WeBWorK Apache |
| 23 | # |
23 | # configuration file (webwork.apache-config) and available for use here: |
| 24 | # $webworkRoot directory that contains the WeBWorK distribution |
24 | # |
| 25 | # corresponds to the directory !WEBWORK_ROOT! in the stanza below |
|
|
| 26 | # $webworkURLRoot base URL handled by Apache::WeBWorK |
25 | # $webwork_url The base URL handled by Apache::WeBWorK. |
| 27 | # corresponds to url /webwork2 in the stanza below |
26 | # $webwork_dir The path to the base webwork2 directory. |
| 28 | # $pgRoot directory that contains the PG distribution |
27 | # $pg_dir The path to the base pg directory. |
| 29 | # corresponds to the directory !PG_ROOT! below |
28 | # |
| 30 | # $courseName name of the course being used (e.g. mth101) |
29 | # $webwork_htdocs_url The base URL of the WeBWorK htdocs directory. |
| 31 | # |
30 | # $webwork_htdocs_dir The path to the WeBWorK htdocs directory. |
| 32 | # Stanza placed in the httpd.conf directory |
31 | # |
| 33 | # <Location /webwork2> |
32 | # $webwork_courses_url The base URL of the WeBWorK courses directory. |
| 34 | # SetHandler perl-script |
33 | # $webwork_courses_dir The path to the WeBWorK courses directory. |
| 35 | # PerlHandler Apache::WeBWorK |
|
|
| 36 | # |
34 | # |
| 37 | # PerlSetVar webwork_root !WEBWORK_ROOT! |
35 | # In addition, the $courseName variable holds the name of the current course. |
| 38 | # PerlSetVar pg_root !PG_ROOT! |
|
|
| 39 | # <Perl> |
|
|
| 40 | # use lib '!WEBWORK_ROOT!/lib'; |
|
|
| 41 | # use lib '!PG_ROOT!/lib'; |
|
|
| 42 | # </Perl> |
|
|
| 43 | # </Location> |
|
|
| 44 | |
36 | |
| 45 | ################################################################################ |
|
|
| 46 | # The following two variables must match the first and second entries of the |
|
|
| 47 | # AliasMatch statement placed in the httpd.conf file |
|
|
| 48 | ################################################################################ |
|
|
| 49 | |
|
|
| 50 | |
|
|
| 51 | # The AliasMatch directive directs to files stored in the html directory of each course. |
|
|
| 52 | # AliasMatch ^/webwork2_course_files/([^/]*)/(.*) !COURSES_ROOT!/$1/html/$2 |
|
|
| 53 | # URL ---------> html directory of the course |
|
|
| 54 | # |
|
|
| 55 | # $1 matches the courseName $2 matches any subdirectories of the course html directory |
|
|
| 56 | # !COURSES_ROOT! matches $courseDirsRoot |
|
|
| 57 | |
|
|
| 58 | my $courseURLRoot = "/webwork2_course_files/$courseName"; |
|
|
| 59 | |
|
|
| 60 | my $courseDirsRoot = "$webworkRoot/courses/"; |
|
|
| 61 | |
|
|
| 62 | |
|
|
| 63 | # This alias directive redirects /webwork2_files to the toplevel material in the global webwork2/htdocs directory |
|
|
| 64 | # Alias /webwork2_files/ !WEBWORK_ROOT!/htdocs/ |
|
|
| 65 | |
|
|
| 66 | my $webworkLocalDocsURL = "/webwork2_files"; |
|
|
| 67 | my $webworkLocalDocsDir = "$webworkRoot/htdocs"; |
|
|
| 68 | ################################################################################ |
37 | ################################################################################ |
| 69 | # System-wide locations (directories and URLs) |
38 | # System-wide locations (directories and URLs) |
| 70 | ################################################################################ |
39 | ################################################################################ |
| 71 | |
40 | |
| 72 | # The root directory, set by webwork_root variable in Apache configuration. |
41 | # The root directory, set by webwork_root variable in Apache configuration. |
| 73 | $webworkDirs{root} = "$webworkRoot"; |
42 | $webworkDirs{root} = "$webwork_dir"; |
| 74 | |
43 | |
| 75 | # Location of system-wide data files. |
44 | # Location of system-wide data files. |
| 76 | $webworkDirs{DATA} = "$webworkDirs{root}/DATA"; |
45 | $webworkDirs{DATA} = "$webworkDirs{root}/DATA"; |
| 77 | |
46 | |
| 78 | # Used for temporary storage of uploaded files. |
47 | # Used for temporary storage of uploaded files. |
| … | |
… | |
| 83 | |
52 | |
| 84 | # Location of configuration files, templates, snippets, etc. |
53 | # Location of configuration files, templates, snippets, etc. |
| 85 | $webworkDirs{conf} = "$webworkDirs{root}/conf"; |
54 | $webworkDirs{conf} = "$webworkDirs{root}/conf"; |
| 86 | |
55 | |
| 87 | # Location of course directories. |
56 | # Location of course directories. |
| 88 | $webworkDirs{courses} = "$courseDirsRoot"; |
57 | $webworkDirs{courses} = "$webwork_courses_dir" || "$webworkDirs{root}/courses"; |
| 89 | |
58 | |
| 90 | # Contains the WeBWorK libraries. (FIXME: not used) |
59 | # Contains the WeBWorK libraries. (FIXME: not used) |
| 91 | #$webworkDirs{lib} = "$webworkDirs{root}/lib"; |
60 | #$webworkDirs{lib} = "$webworkDirs{root}/lib"; |
| 92 | |
61 | |
| 93 | # Contains log files. |
62 | # Contains log files. |
| 94 | $webworkDirs{logs} = "$webworkDirs{root}/logs"; |
63 | $webworkDirs{logs} = "$webworkDirs{root}/logs"; |
| 95 | |
64 | |
| 96 | # Location of PG macros. (FIXME: not used) |
65 | # Location of PG macros. (FIXME: not used) |
| 97 | #$webworkDirs{macros} = "$pgRoot/macros"; |
66 | #$webworkDirs{macros} = "$pg_dir/macros"; |
| 98 | |
67 | |
| 99 | # Contains non-web-accessible temporary files, such as TeX working directories. |
68 | # Contains non-web-accessible temporary files, such as TeX working directories. |
| 100 | $webworkDirs{tmp} = "$webworkDirs{root}/tmp"; |
69 | $webworkDirs{tmp} = "$webworkDirs{root}/tmp"; |
| 101 | |
70 | |
| 102 | ##### The following locations are web-accessible. |
71 | ##### The following locations are web-accessible. |
| 103 | |
72 | |
| 104 | # The root URL (usually /webwork2), set by <Location> in Apache configuration. |
73 | # The root URL (usually /webwork2), set by <Location> in Apache configuration. |
| 105 | $webworkURLs{root} = "$webworkURLRoot"; |
74 | $webworkURLs{root} = "$webwork_url"; |
| 106 | |
75 | |
| 107 | # Location of system-wide web-accessible files, such as equation images, and |
76 | # Location of system-wide web-accessible files, such as equation images, and |
| 108 | # help files. |
77 | # help files. |
| 109 | $webworkDirs{htdocs} = "$webworkLocalDocsDir"; |
78 | $webworkDirs{htdocs} = "$webwork_htdocs_dir" || "$webworkDirs{root}/htdocs"; |
| 110 | $webworkURLs{htdocs} = "$webworkLocalDocsURL"; |
79 | $webworkURLs{htdocs} = "$webwork_htdocs_url"; |
| 111 | |
80 | |
| 112 | # The URL of the static WeBWorK home page (FIXME: not used) |
81 | # The URL of the static WeBWorK home page (FIXME: not used) |
| 113 | #$webworkURLs{home} = "$webworkURLs{htdocs}/index.html"; |
82 | #$webworkURLs{home} = "$webworkURLs{htdocs}/index.html"; |
| 114 | |
83 | |
| 115 | # Location of web-accessible temporary files, such as equation images. |
84 | # Location of web-accessible temporary files, such as equation images. |
| … | |
… | |
| 155 | # Location of authentication data files when using a WW1 (GDBM) database. |
124 | # Location of authentication data files when using a WW1 (GDBM) database. |
| 156 | $courseDirs{auth_DATA} = "$courseDirs{DATA}/.auth"; |
125 | $courseDirs{auth_DATA} = "$courseDirs{DATA}/.auth"; |
| 157 | |
126 | |
| 158 | # Location of course HTML files, passed to PG. |
127 | # Location of course HTML files, passed to PG. |
| 159 | $courseDirs{html} = "$courseDirs{root}/html"; |
128 | $courseDirs{html} = "$courseDirs{root}/html"; |
| 160 | $courseURLs{html} = "/webwork2_course_files/$courseName"; |
129 | $courseURLs{html} = "$webwork_courses_url/$courseName"; |
| 161 | #$courseURLs{root} = $courseURLs{html}; # FIXME: not used |
130 | #$courseURLs{root} = $courseURLs{html}; # FIXME: not used |
| 162 | |
131 | |
| 163 | # Location of course image files, passed to PG. |
132 | # Location of course image files, passed to PG. |
| 164 | $courseDirs{html_images} = "$courseDirs{html}/images"; |
133 | $courseDirs{html_images} = "$courseDirs{html}/images"; |
| 165 | |
134 | |
| … | |
… | |
| 380 | # Select the default database layout. This can be overridden in the course.conf |
349 | # Select the default database layout. This can be overridden in the course.conf |
| 381 | # file of a particular course. If you choose "gdbm", WeBWorK will be able to |
350 | # file of a particular course. If you choose "gdbm", WeBWorK will be able to |
| 382 | # use courses from WeBWorK 1 without first adding course.conf files to them. |
351 | # use courses from WeBWorK 1 without first adding course.conf files to them. |
| 383 | # However, the recommended database layout for new courses is "sql". This can |
352 | # However, the recommended database layout for new courses is "sql". This can |
| 384 | # be set when creating a course. |
353 | # be set when creating a course. |
| 385 | $dbLayoutName = "sql"; # or: "gdbm" |
354 | $dbLayoutName = "sql"; # or "gdbm"; |
| 386 | |
355 | |
| 387 | # This sets the symbol "dbLayout" as an alias for the selected database layout. |
356 | # This sets the symbol "dbLayout" as an alias for the selected database layout. |
| 388 | *dbLayout = $dbLayouts{$dbLayoutName}; |
357 | *dbLayout = $dbLayouts{$dbLayoutName}; |
| 389 | |
358 | |
| 390 | ################################################################################ |
359 | ################################################################################ |
| … | |
… | |
| 543 | }; |
512 | }; |
| 544 | |
513 | |
| 545 | ##### Directories used by PG |
514 | ##### Directories used by PG |
| 546 | |
515 | |
| 547 | # The root of the PG directory tree (from pg_root in Apache config). |
516 | # The root of the PG directory tree (from pg_root in Apache config). |
| 548 | $pg{directories}{root} = "$pgRoot"; |
517 | $pg{directories}{root} = "$pg_dir"; |
| 549 | $pg{directories}{lib} = "$pg{directories}{root}/lib"; |
518 | $pg{directories}{lib} = "$pg{directories}{root}/lib"; |
| 550 | $pg{directories}{macros} = "$pg{directories}{root}/macros"; |
519 | $pg{directories}{macros} = "$pg{directories}{root}/macros"; |
| 551 | |
520 | |
| 552 | ##### "Special" PG environment variables. (Stuff that doesn't fit in anywhere else.) |
521 | ##### "Special" PG environment variables. (Stuff that doesn't fit in anywhere else.) |
| 553 | |
522 | |
| … | |
… | |
| 615 | numZeroLevelDefault => 1E-14, |
584 | numZeroLevelDefault => 1E-14, |
| 616 | numZeroLevelTolDefault => 1E-12, |
585 | numZeroLevelTolDefault => 1E-12, |
| 617 | useBaseTenLog => 0, |
586 | useBaseTenLog => 0, |
| 618 | defaultDisplayMatrixStyle => "[s]", |
587 | defaultDisplayMatrixStyle => "[s]", |
| 619 | }; |
588 | }; |
|
|
589 | |
|
|
590 | ################################################################################ |
|
|
591 | # Compatibility |
|
|
592 | ################################################################################ |
|
|
593 | |
|
|
594 | # Define the old names for the various "root" variables. |
|
|
595 | $webworkRoot = $webworkDirs{root}; |
|
|
596 | $webworkURLRoot = $webworkURLs{root}; |
|
|
597 | $pgRoot = $pg{directories}{root}; |