| 1 | #!perl |
1 | #!perl |
| 2 | ################################################################################ |
2 | ################################################################################ |
| 3 | # WeBWorK mod_perl (c) 1995-2002 WeBWorK Team, Univeristy of Rochester |
3 | # WeBWorK Online Homework Delivery System |
| 4 | # $Id: global.conf.dist,v 1.2 2002-11-25 08:29:55 sh002i Exp $ |
4 | # Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/ |
|
|
5 | # $CVSHeader: webwork-modperl/conf/global.conf.dist,v 1.67 2004/05/23 23:17:23 gage Exp $ |
|
|
6 | # |
|
|
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 |
|
|
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. |
|
|
11 | # |
|
|
12 | # This program is distributed in the hope that it will be useful, but WITHOUT |
|
|
13 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
|
|
14 | # FOR A PARTICULAR PURPOSE. See either the GNU General Public License or the |
|
|
15 | # Artistic License for more details. |
| 5 | ################################################################################ |
16 | ################################################################################ |
| 6 | |
17 | |
| 7 | # 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 |
| 8 | # 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. |
| 9 | # 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. |
| 10 | # 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, |
| 11 | # use the "my" keyword. The following variables are available to this file: |
22 | # use the "my" keyword. The following variables are available to this file: |
| 12 | # |
23 | # |
| 13 | # $webworkRoot directory that contains the WeBWorK distribution |
24 | # $webworkRoot directory that contains the WeBWorK distribution |
|
|
25 | # $webworkURL base URL handled by Apache::WeBWorK |
|
|
26 | # $pgRoot directory that contains the PG distribution |
| 14 | # $courseName name of the course being used |
27 | # $courseName name of the course being used |
| 15 | |
28 | |
| 16 | ################################################################################ |
29 | ################################################################################ |
|
|
30 | # WeBWorK settings |
|
|
31 | ################################################################################ |
| 17 | |
32 | |
| 18 | %webworkDirs = ( |
33 | %webworkDirs = ( |
| 19 | root => "$webworkRoot", |
34 | root => "$webworkRoot", |
|
|
35 | DATA => "$webworkRoot/DATA", |
|
|
36 | uploadCache => "$webworkRoot/DATA/uploads", |
| 20 | bin => "$webworkRoot/bin", |
37 | bin => "$webworkRoot/bin", |
| 21 | conf => "$webworkRoot/conf", |
38 | conf => "$webworkRoot/conf", |
| 22 | courses => "$webworkRoot/courses", |
39 | courses => "$webworkRoot/courses", |
|
|
40 | htdocs => "$webworkRoot/htdocs", |
|
|
41 | htdocs_temp => "$webworkRoot/htdocs/tmp", |
|
|
42 | equationCache => "$webworkRoot/htdocs/tmp/equations", |
| 23 | lib => "$webworkRoot/lib", |
43 | lib => "$webworkRoot/lib", |
| 24 | logs => "$webworkRoot/logs", |
44 | logs => "$webworkRoot/logs", |
| 25 | macros => "$webworkRoot/macros", |
45 | macros => "$pgRoot/macros", |
| 26 | tmp => "$webworkRoot/tmp", |
46 | tmp => "$webworkRoot/tmp", |
|
|
47 | libraryRoot => "", # set to the top of the problem library, if its installed |
| 27 | ); |
48 | ); |
|
|
49 | |
|
|
50 | %webworkFiles = ( |
|
|
51 | environment => "$webworkDirs{conf}/global.conf", |
|
|
52 | hardcopySnippets => { |
|
|
53 | preamble => "$webworkDirs{conf}/snippets/hardcopyPreamble.tex", |
|
|
54 | setHeader => "$webworkDirs{conf}/snippets/setHeader.pg", # hardcopySetHeader.pg", |
|
|
55 | problemDivider => "$webworkDirs{conf}/snippets/hardcopyProblemDivider.tex", |
|
|
56 | setFooter => "$webworkDirs{conf}/snippets/hardcopySetFooter.pg", |
|
|
57 | setDivider => "$webworkDirs{conf}/snippets/hardcopySetDivider.tex", |
|
|
58 | userDivider => "$webworkDirs{conf}/snippets/hardcopyUserDivider.tex", |
|
|
59 | postamble => "$webworkDirs{conf}/snippets/hardcopyPostamble.tex", |
|
|
60 | }, |
|
|
61 | screenSnippets => { |
|
|
62 | setHeader => "$webworkDirs{conf}/snippets/setHeader.pg", # screenSetHeader.pg", |
|
|
63 | }, |
|
|
64 | logs => { |
|
|
65 | timing => "$webworkDirs{logs}/timing.log", |
|
|
66 | }, |
|
|
67 | equationCacheDB => "$webworkDirs{DATA}/equationcache", |
|
|
68 | ); |
|
|
69 | |
|
|
70 | %webworkURLs = ( |
|
|
71 | root => "$webworkURLRoot", |
|
|
72 | home => "/webwork2_files/index.html", |
|
|
73 | htdocs => "/webwork2_files", |
|
|
74 | htdocs_temp => "/webwork2_files/tmp", |
|
|
75 | equationCache => "/webwork2_files/tmp/equations", |
|
|
76 | docs => "http://webhost.math.rochester.edu/webworkdocs/docs", |
|
|
77 | local_help => "/webwork2_files/helpFiles", |
|
|
78 | oldProf => "/webwork1/profLogin.pl", |
|
|
79 | jsMath => "/webwork2_files/jsMath/jsMath.js", |
|
|
80 | ); |
|
|
81 | |
|
|
82 | ################################################################################ |
|
|
83 | # Default course-specific settings |
|
|
84 | ################################################################################ |
| 28 | |
85 | |
| 29 | my $courseRoot = "$webworkDirs{courses}/$courseName"; |
86 | my $courseRoot = "$webworkDirs{courses}/$courseName"; |
| 30 | %courseDirs = ( |
87 | %courseDirs = ( |
| 31 | root => "$courseRoot", |
88 | root => "$courseRoot", |
| 32 | DATA => "$courseRoot/DATA", |
89 | DATA => "$courseRoot/DATA", |
| … | |
… | |
| 36 | html_temp => "$courseRoot/html/tmp", |
93 | html_temp => "$courseRoot/html/tmp", |
| 37 | logs => "$courseRoot/logs", |
94 | logs => "$courseRoot/logs", |
| 38 | scoring => "$courseRoot/scoring", |
95 | scoring => "$courseRoot/scoring", |
| 39 | templates => "$courseRoot/templates", |
96 | templates => "$courseRoot/templates", |
| 40 | macros => "$courseRoot/templates/macros", |
97 | macros => "$courseRoot/templates/macros", |
|
|
98 | email => "$courseRoot/templates/email", |
| 41 | ); |
99 | ); |
| 42 | |
100 | |
| 43 | %webworkFiles = ( |
101 | %courseFiles = ( |
| 44 | environment => "$webworkDirs{conf}/global.conf", |
102 | environment => "$courseDirs{root}/course.conf", |
| 45 | hardcopySnippets => { |
103 | motd => "$courseDirs{templates}/motd.txt", |
| 46 | preamble => "$webworkDirs{conf}/hardcopyPreamble.tex", |
|
|
| 47 | setHeader => "$webworkDirs{conf}/hardcopySetHeader.pg", |
|
|
| 48 | problemDivider => "$webworkDirs{conf}/hardcopyProblemDivider.tex", |
|
|
| 49 | setFooter => "$webworkDirs{conf}/hardcopySetFooter.pg", |
|
|
| 50 | setDivider => "$webworkDirs{conf}/hardcopySetDivider.tex", |
|
|
| 51 | postamble => "$webworkDirs{conf}/hardcopyPostamble.tex", |
|
|
| 52 | }, |
|
|
| 53 | screenSnippets => { |
|
|
| 54 | setHeader => "$webworkDirs{conf}/screenSetHeader.pg", |
|
|
| 55 | }, |
|
|
| 56 | logs => { |
104 | logs => { |
| 57 | timing => "$webworkDirs{logs}/timing.log", |
105 | answer_log => "$courseDirs{logs}/answer_log", |
| 58 | transaction => "$courseDirs{logs}/transaction.log", |
|
|
| 59 | }, |
106 | }, |
|
|
107 | course_info => "course_info.txt", # path relative to templates directory |
|
|
108 | login_info => "login_info.txt", # path relative to templates directory |
| 60 | ); |
109 | ); |
| 61 | |
110 | |
| 62 | %courseFiles = ( |
111 | # quick hack to fix transaction logging. blah. |
| 63 | environment => "$courseDirs{root}/course.conf", |
112 | $webworkFiles{logs}->{transaction} = "$courseDirs{logs}/transaction.log"; |
| 64 | ); |
113 | $webworkFiles{logs}->{pastAnswerList} = "$courseDirs{logs}/past_answers.log"; |
| 65 | |
114 | |
| 66 | my $webworkURLRoot = "/webwork"; |
|
|
| 67 | %webworkURLs = ( |
|
|
| 68 | root => "$webworkURLRoot", |
|
|
| 69 | htdocs => "/webwork_files", |
|
|
| 70 | docs => "http://webhost.math.rochester.edu/webworkdocs/docs", |
|
|
| 71 | ); |
|
|
| 72 | |
|
|
| 73 | my $courseURLRoot = "$webworkURLs{htdocs}/$courseName"; |
115 | my $courseURLRoot = "/webwork2_course_files/$courseName"; |
| 74 | %courseURLs = ( |
116 | %courseURLs = ( |
| 75 | base => "$courseURLRoot", |
117 | root => "$courseURLRoot", |
| 76 | html => "$courseURLRoot", |
118 | html => "$courseURLRoot", |
| 77 | html_temp => "$courseURLRoot/tmp", |
119 | html_temp => "$courseURLRoot/tmp", |
| 78 | ); |
120 | ); |
| 79 | |
121 | |
| 80 | ################################################################################ |
122 | ################################################################################ |
|
|
123 | # Other site-specific options |
|
|
124 | ################################################################################ |
| 81 | |
125 | |
| 82 | %dbInfo = ( |
126 | %mail = ( |
| 83 | auth_type => "GDBM", |
127 | smtpServer => "mail.math.rochester.edu", |
| 84 | auth_passwd_file => "$courseDirs{auth_DATA}/$courseName\_password_DB", |
128 | smtpSender => "webwork\@math.rochester.edu", |
| 85 | auth_perm_file => "$courseDirs{auth_DATA}/$courseName\_permissions_DB", |
129 | |
| 86 | auth_keys_file => "$courseDirs{auth_DATA}/keys", |
130 | # allowedRecipients defines addresses that the PG system is allowed to |
| 87 | wwdb_type => "GDBM", |
131 | # send mail to. this prevents subtle PG exploits. This should be set |
| 88 | wwdb_file => "$courseDirs{DATA}/$courseName\_webwork_DB", |
132 | # in course.conf to the addresses of professors of each course. Sending |
| 89 | cldb_type => "GDBM", |
133 | # mail from the PG system (i.e. questionaires, essay questions) will |
| 90 | cldb_file => "$courseDirs{DATA}/$courseName\_classlist_DB", |
134 | # fail if this is not set somewhere (either here or in course.conf). |
| 91 | psvn_digits => 5, |
135 | #allowedRecipients => [ |
|
|
136 | # 'prof1@host.yourdomain.edu', |
|
|
137 | # 'prof2@host.yourdomain.edu', |
|
|
138 | #], |
|
|
139 | |
|
|
140 | # if defined, feedbackRecipients overrides the list of recipients for |
|
|
141 | # feedback email. It's appropriate to set this in the course.conf for |
|
|
142 | # specific courses, but probably not in global.conf. if not defined, |
|
|
143 | # mail is sent to all professors and TAs for a given course |
|
|
144 | #feedbackRecipients => [ |
|
|
145 | # 'prof1@host.yourdomain.edu', |
|
|
146 | # 'prof2@host.yourdomain.edu', |
|
|
147 | #], |
|
|
148 | |
|
|
149 | # feedbackVerbosity: |
|
|
150 | # 0: send only the feedback comment and context link |
|
|
151 | # 1: as in 0, plus user, set, problem, and PG data |
|
|
152 | # 2: as in 1, plus the problem environment (debugging data) |
|
|
153 | feedbackVerbosity => 1, |
|
|
154 | |
|
|
155 | # defines the size of the Mail Merge editor window |
|
|
156 | # FIXME: should this be here? it's UI, not mail |
|
|
157 | # FIXME: replace this with the auto-size method that TWiki uses |
|
|
158 | editor_window_rows => 15, |
|
|
159 | editor_window_columns => 100, |
| 92 | ); |
160 | ); |
|
|
161 | |
|
|
162 | %externalPrograms = ( |
|
|
163 | mkdir => "/bin/mkdir", |
|
|
164 | tth => "/usr/local/bin/tth", |
|
|
165 | pdflatex => "/usr/local/bin/pdflatex", |
|
|
166 | latex => "/usr/local/bin/latex", |
|
|
167 | dvipng => "/usr/local/bin/dvipng", |
|
|
168 | gif2eps => "$webworkDirs{bin}/gif2eps", |
|
|
169 | png2eps => "$webworkDirs{bin}/png2eps", |
|
|
170 | gif2png => "$webworkDirs{bin}/gif2png", |
|
|
171 | mysql => "/usr/local/bin/mysql", |
|
|
172 | ); |
|
|
173 | |
|
|
174 | %siteDefaults = ( |
|
|
175 | status => { |
|
|
176 | audit => "Audit", |
|
|
177 | A => "Audit", |
|
|
178 | drop => "Drop", |
|
|
179 | D => "Drop", |
|
|
180 | withdraw => "Drop", |
|
|
181 | current => "Enrolled", |
|
|
182 | C => "Enrolled", |
|
|
183 | enrolled => "Enrolled", |
|
|
184 | }, |
|
|
185 | ); |
|
|
186 | |
|
|
187 | ################################################################################ |
|
|
188 | # Frontend options |
|
|
189 | ################################################################################ |
| 93 | |
190 | |
| 94 | %templates = ( |
191 | %templates = ( |
| 95 | system => "$webworkDirs{conf}/barebones.template", |
192 | system => "$webworkDirs{conf}/templates/ur.template", |
| 96 | ); |
193 | ); |
| 97 | |
194 | |
|
|
195 | ################################################################################ |
|
|
196 | # Database options |
|
|
197 | ################################################################################ |
|
|
198 | |
|
|
199 | # Several database are defined in the file conf/database.conf and stored in the |
|
|
200 | # hash %dbLayouts. |
|
|
201 | include "conf/database.conf"; |
|
|
202 | |
|
|
203 | # Select the default database layout. This can be overridden in the course.conf |
|
|
204 | # file of a particular course. |
|
|
205 | #$dbLayoutName = "sql"; |
|
|
206 | $dbLayoutName = "gdbm"; |
|
|
207 | |
|
|
208 | *dbLayout = $dbLayouts{$dbLayoutName}; |
|
|
209 | |
|
|
210 | ################################################################################ |
|
|
211 | # Problem library options |
|
|
212 | ################################################################################ |
|
|
213 | |
|
|
214 | %problemLibrary = ( |
|
|
215 | root => "", # set to the top of the problem library, if its installed |
|
|
216 | sourceSQL => "ProblemLibrary", |
|
|
217 | userSQL => "webworkRead", |
|
|
218 | passwordSQL => "", |
|
|
219 | ); |
|
|
220 | |
|
|
221 | ################################################################################ |
|
|
222 | # Authorization system |
|
|
223 | ################################################################################ |
|
|
224 | |
|
|
225 | # This lets you specify a minimum permission level needed to perform certain |
|
|
226 | # actions. In the current system, >=10 will allow a professor to perform the |
|
|
227 | # action, >=5 will allow a TA to, and >=0 will allow a student to perform an |
|
|
228 | # action (almost never what you want). |
|
|
229 | my $ta = 5; |
|
|
230 | my $professor = 10; |
|
|
231 | %permissionLevels = ( |
|
|
232 | become_student => $professor, |
|
|
233 | access_instructor_tools => $ta, |
|
|
234 | create_and_delete_problem_sets => $professor, |
|
|
235 | modify_problem_sets => $professor, |
|
|
236 | assign_problem_sets => $professor, |
|
|
237 | modify_student_data => $professor, |
|
|
238 | score_sets => $professor, |
|
|
239 | send_mail => $professor, |
|
|
240 | modify_classlist_files => $professor, |
|
|
241 | modify_set_def_files => $professor, |
|
|
242 | modify_scoring_files => $professor, |
|
|
243 | create_and_delete_courses => $professor, |
|
|
244 | ); |
|
|
245 | |
|
|
246 | ################################################################################ |
|
|
247 | # Session options |
|
|
248 | ################################################################################ |
|
|
249 | |
| 98 | # sessionKeyTimeout defines length of inactivity before a key expires (seconds) |
250 | # $sessionKeyTimeout defines seconds of inactivity before a key expires |
| 99 | $sessionKeyTimeout = 60*30; |
251 | $sessionKeyTimeout = 60*30; |
|
|
252 | |
|
|
253 | # $sessionKeyLength defines the length (in characters) of the session key |
|
|
254 | $sessionKeyLength = 40; |
|
|
255 | |
|
|
256 | # @sessionKeyChars lists the legal session key characters |
|
|
257 | @sessionKeyChars = ('A'..'Z', 'a'..'z', '0'..'9', '.', '^', '/', '!', '*'); |
| 100 | |
258 | |
| 101 | # Practice users are users who's names start with $practiceUser |
259 | # Practice users are users who's names start with $practiceUser |
| 102 | # (you can comment this out to remove practice user support) |
260 | # (you can comment this out to remove practice user support) |
| 103 | $practiceUserPrefix = "practice"; |
261 | $practiceUserPrefix = "practice"; |
| 104 | |
262 | |
| … | |
… | |
| 106 | # commented out by default, though, so you don't hurt yourself. It is |
264 | # commented out by default, though, so you don't hurt yourself. It is |
| 107 | # kindof a backdoor to the practice user system, since he doesn't have a |
265 | # kindof a backdoor to the practice user system, since he doesn't have a |
| 108 | # password. Come to think of it, why do we even have this?! |
266 | # password. Come to think of it, why do we even have this?! |
| 109 | #$debugPracticeUser = "practice666"; |
267 | #$debugPracticeUser = "practice666"; |
| 110 | |
268 | |
| 111 | # This lets you specify a minimum permission level needed to perform |
269 | ################################################################################ |
| 112 | # certain actions. In the current system, >=10 will allow a professor |
|
|
| 113 | # to perform the action, >=5 will allow a TA to, and >=0 will allow a |
|
|
| 114 | # student to perform an action (almost never what you want). |
|
|
| 115 | %permissionLevels = ( |
|
|
| 116 | "become_student" => 10, |
|
|
| 117 | ); |
|
|
| 118 | |
|
|
| 119 | # mail |
|
|
| 120 | %mail = ( |
|
|
| 121 | smtpServer => "mail.math.rochester.edu", |
|
|
| 122 | smtpSender => "webwork\@math.rochester.edu", |
|
|
| 123 | ); |
|
|
| 124 | |
|
|
| 125 | # PG translation stuff |
270 | # PG translation options |
|
|
271 | ################################################################################ |
|
|
272 | |
| 126 | %pg = ( |
273 | %pg = ( |
|
|
274 | # available display modes |
|
|
275 | displayModes => [ qw(plainText formattedText images jsMath) ], |
|
|
276 | # pg options |
| 127 | options => { |
277 | options => { |
| 128 | # default translation options: |
278 | # default translation options |
| 129 | displayMode => "images", |
279 | displayMode => "images", |
| 130 | showOldAnswers => 1, |
280 | showOldAnswers => 1, |
| 131 | showCorrectAnswers => 0, |
281 | showCorrectAnswers => 0, |
| 132 | showHints => 0, |
282 | showHints => 0, |
| 133 | showSolutions => 0, |
283 | showSolutions => 0, |
|
|
284 | catchWarnings => 0, # there's a global warning catcher now |
| 134 | # default grader |
285 | # default grader |
| 135 | grader => "avg_problem_grader", |
286 | grader => "avg_problem_grader", |
| 136 | catchWarnings => 1, |
287 | }, |
|
|
288 | # options for various renderers |
|
|
289 | renderers => { |
|
|
290 | "WeBWorK::PG::Remote" => { |
|
|
291 | proxy => "http://localhost:21000/RenderD" |
|
|
292 | } |
|
|
293 | }, |
|
|
294 | # currently selected renderer |
|
|
295 | renderer => "WeBWorK::PG::Local", |
|
|
296 | #renderer => "WeBWorK::PG::Remote", |
|
|
297 | # directories used by PG |
|
|
298 | directories => { |
|
|
299 | # directories used only by PG |
|
|
300 | root => "$pgRoot", |
|
|
301 | lib => "$pgRoot/lib", |
|
|
302 | macros => "$pgRoot/macros", |
|
|
303 | }, |
|
|
304 | # this will be customized in the course.conf file |
|
|
305 | specialPGEnvironmentVars => { |
|
|
306 | PRINT_FILE_NAMES_FOR => [ qw(professor) ], |
|
|
307 | CAPA_Tools => "$courseDirs{macros}/CAPA_Tools/", |
|
|
308 | CAPA_MCTools => "$courseDirs{macros}/CAPA_MCTools/", |
|
|
309 | CAPA_Graphics_URL => "$courseURLs{html}/CAPA_Graphics/", |
|
|
310 | CAPA_GraphicsDirectory => "$courseDirs{html}/CAPA_Graphics/", |
| 137 | }, |
311 | }, |
| 138 | # modules lists module names and the packages each contains |
312 | # modules lists module names and the packages each contains |
| 139 | modules => [ |
313 | modules => [ |
| 140 | [qw(DynaLoader)], |
314 | [qw(DynaLoader)], |
| 141 | [qw(Exporter)], |
315 | [qw(Exporter)], |
| … | |
… | |
| 177 | numAbsTolDefault => .001, |
351 | numAbsTolDefault => .001, |
| 178 | numFormatDefault => "", |
352 | numFormatDefault => "", |
| 179 | numRelPercentTolDefault => .1, |
353 | numRelPercentTolDefault => .1, |
| 180 | numZeroLevelDefault => 1E-14, |
354 | numZeroLevelDefault => 1E-14, |
| 181 | numZeroLevelTolDefault => 1E-12, |
355 | numZeroLevelTolDefault => 1E-12, |
|
|
356 | useBaseTenLog => 0, |
|
|
357 | defaultDisplayMatrixStyle => "[s]", |
| 182 | }, |
358 | }, |
| 183 | ); |
359 | ); |
| 184 | |
|
|
| 185 | %externalPrograms = ( |
|
|
| 186 | mv => "/bin/mv", # *** is this used? probably not... |
|
|
| 187 | tth => "/usr/local/bin/tth", |
|
|
| 188 | pdflatex => "/usr/local/bin/pdflatex", |
|
|
| 189 | latex => "/usr/local/bin/latex", |
|
|
| 190 | dvipng => "/usr/local/bin/dvipng -mode ljfivemp -D600 -Q6 -x1000.5 -bgTransparent", |
|
|
| 191 | gif2eps => "$webworkDirs{bin}/gif2eps", |
|
|
| 192 | png2eps => "$webworkDirs{bin}/png2eps", |
|
|
| 193 | gif2png => "$webworkDirs{bin}/gif2png", |
|
|
| 194 | ); |
|
|