| 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.18 2003-04-23 06:35:06 sh002i Exp $ |
4 | # Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/ |
|
|
5 | # $CVSHeader: webwork2/conf/global.conf.dist,v 1.88 2004/07/12 02:30:21 sh002i 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 set in the WeBWorK Apache |
| 12 | # |
23 | # configuration file (webwork.apache-config) and available for use here: |
| 13 | # $webworkRoot directory that contains the WeBWorK distribution |
24 | # |
| 14 | # $webworkURL base URL handled by Apache::WeBWorK |
25 | # $webwork_url The base URL handled by Apache::WeBWorK. |
| 15 | # $courseName name of the course being used |
26 | # $webwork_dir The path to the base webwork2 directory. |
|
|
27 | # $pg_dir The path to the base pg directory. |
|
|
28 | # |
|
|
29 | # $webwork_htdocs_url The base URL of the WeBWorK htdocs directory. |
|
|
30 | # $webwork_htdocs_dir The path to the WeBWorK htdocs directory. |
|
|
31 | # |
|
|
32 | # $webwork_courses_url The base URL of the WeBWorK courses directory. |
|
|
33 | # $webwork_courses_dir The path to the WeBWorK courses directory. |
|
|
34 | # |
|
|
35 | # In addition, the $courseName variable holds the name of the current course. |
| 16 | |
36 | |
| 17 | ################################################################################ |
37 | ################################################################################ |
| 18 | # WeBWorK settings |
38 | # System-wide locations (directories and URLs) |
| 19 | ################################################################################ |
39 | ################################################################################ |
| 20 | |
40 | |
| 21 | %webworkDirs = ( |
41 | # The root directory, set by webwork_root variable in Apache configuration. |
| 22 | root => "$webworkRoot", |
42 | $webworkDirs{root} = "$webwork_dir"; |
| 23 | bin => "$webworkRoot/bin", |
43 | |
| 24 | conf => "$webworkRoot/conf", |
44 | # Location of system-wide data files. |
| 25 | courses => "$webworkRoot/courses", |
45 | $webworkDirs{DATA} = "$webworkDirs{root}/DATA"; |
| 26 | lib => "$webworkRoot/lib", |
46 | |
| 27 | logs => "$webworkRoot/logs", |
47 | # Used for temporary storage of uploaded files. |
| 28 | macros => "$webworkRoot/macros", |
48 | $webworkDirs{uploadCache} = "$webworkDirs{DATA}/uploads"; |
| 29 | tmp => "$webworkRoot/tmp", |
49 | |
|
|
50 | # Location of utility programs. |
|
|
51 | $webworkDirs{bin} = "$webworkDirs{root}/bin"; |
|
|
52 | |
|
|
53 | # Location of configuration files, templates, snippets, etc. |
|
|
54 | $webworkDirs{conf} = "$webworkDirs{root}/conf"; |
|
|
55 | |
|
|
56 | # Location of course directories. |
|
|
57 | $webworkDirs{courses} = "$webwork_courses_dir" || "$webworkDirs{root}/courses"; |
|
|
58 | |
|
|
59 | # Contains log files. |
|
|
60 | $webworkDirs{logs} = "$webworkDirs{root}/logs"; |
|
|
61 | |
|
|
62 | # Contains non-web-accessible temporary files, such as TeX working directories. |
|
|
63 | $webworkDirs{tmp} = "$webworkDirs{root}/tmp"; |
|
|
64 | |
|
|
65 | ##### The following locations are web-accessible. |
|
|
66 | |
|
|
67 | # The root URL (usually /webwork2), set by <Location> in Apache configuration. |
|
|
68 | $webworkURLs{root} = "$webwork_url"; |
|
|
69 | |
|
|
70 | # Location of system-wide web-accessible files, such as equation images, and |
|
|
71 | # help files. |
|
|
72 | $webworkDirs{htdocs} = "$webwork_htdocs_dir" || "$webworkDirs{root}/htdocs"; |
|
|
73 | $webworkURLs{htdocs} = "$webwork_htdocs_url"; |
|
|
74 | |
|
|
75 | # Location of web-accessible temporary files, such as equation images. |
|
|
76 | $webworkDirs{htdocs_temp} = "$webworkDirs{htdocs}/tmp"; |
|
|
77 | $webworkURLs{htdocs_temp} = "$webworkURLs{htdocs}/tmp"; |
|
|
78 | |
|
|
79 | # Location of cached equation images. |
|
|
80 | $webworkDirs{equationCache} = "$webworkDirs{htdocs_temp}/equations"; |
|
|
81 | $webworkURLs{equationCache} = "$webworkURLs{htdocs_temp}/equations"; |
|
|
82 | |
|
|
83 | # Contains context-sensitive help files. |
|
|
84 | $webworkDirs{local_help} = "$webworkDirs{htdocs}/helpFiles"; |
|
|
85 | $webworkURLs{local_help} = "$webworkURLs{htdocs}/helpFiles"; |
|
|
86 | |
|
|
87 | # URL of general WeBWorK documentation. |
|
|
88 | $webworkURLs{docs} = "http://webhost.math.rochester.edu/webworkdocs/docs"; |
|
|
89 | |
|
|
90 | # URL of WeBWorK 1.x profLogin.pl script, for access to old professor pages. |
|
|
91 | # Note that both systems must share a single "courses" directory for this to be |
|
|
92 | # useful. Leave this blank to disable |
|
|
93 | $webworkURLs{oldProf} = "/webwork1/profLogin.pl"; |
|
|
94 | |
|
|
95 | # URL of WeBWorK Bugzilla database. |
|
|
96 | $webworkURLs{bugReporter} = "http://bugs.webwork.rochester.edu/enter_bug.cgi?product=WeBWorK%20mod_perl"; |
|
|
97 | |
|
|
98 | # Location of jsMath script, used for the jsMath display mode. |
|
|
99 | $webworkURLs{jsMath} = "$webworkURLs{htdocs}/jsMath/jsMath.js"; |
|
|
100 | |
|
|
101 | # Location of ASCIIMathML script, used for the asciimath display mode. |
|
|
102 | $webworkURLs{asciimath} = "$webworkURLs{htdocs}/ASCIIMathML/ASCIIMathML.js"; |
|
|
103 | |
|
|
104 | ################################################################################ |
|
|
105 | # Defaults for course-specific locations (directories and URLs) |
|
|
106 | ################################################################################ |
|
|
107 | |
|
|
108 | # The root directory of the current course. (The ID of the current course is |
|
|
109 | # available in $courseName.) |
|
|
110 | $courseDirs{root} = "$webworkDirs{courses}/$courseName"; |
|
|
111 | |
|
|
112 | # Location of course-specific data files, such as WW1 (GDBM) database files. |
|
|
113 | $courseDirs{DATA} = "$courseDirs{root}/DATA"; |
|
|
114 | |
|
|
115 | # Location of authentication data files when using a WW1 (GDBM) database. |
|
|
116 | $courseDirs{auth_DATA} = "$courseDirs{DATA}/.auth"; |
|
|
117 | |
|
|
118 | # Location of course HTML files, passed to PG. |
|
|
119 | $courseDirs{html} = "$courseDirs{root}/html"; |
|
|
120 | $courseURLs{html} = "$webwork_courses_url/$courseName"; |
|
|
121 | |
|
|
122 | # Location of course image files, passed to PG. |
|
|
123 | $courseDirs{html_images} = "$courseDirs{html}/images"; |
|
|
124 | |
|
|
125 | # Location of web-accessible, course-specific temporary files, like static and |
|
|
126 | # dynamically-generated PG graphics. |
|
|
127 | $courseDirs{html_temp} = "$courseDirs{html}/tmp"; |
|
|
128 | $courseURLs{html_temp} = "$courseURLs{html}/tmp"; |
|
|
129 | |
|
|
130 | # Location of course-specific logs, like the transaction log. |
|
|
131 | $courseDirs{logs} = "$courseDirs{root}/logs"; |
|
|
132 | |
|
|
133 | # Location of scoring files. |
|
|
134 | $courseDirs{scoring} = "$courseDirs{root}/scoring"; |
|
|
135 | |
|
|
136 | # Location of PG templates and set definition files. |
|
|
137 | $courseDirs{templates} = "$courseDirs{root}/templates"; |
|
|
138 | |
|
|
139 | # Location of course-specific macro files. |
|
|
140 | $courseDirs{macros} = "$courseDirs{templates}/macros"; |
|
|
141 | |
|
|
142 | # Location of mail-merge templates. |
|
|
143 | $courseDirs{email} = "$courseDirs{templates}/email"; |
|
|
144 | |
|
|
145 | ################################################################################ |
|
|
146 | # System-wide files |
|
|
147 | ################################################################################ |
|
|
148 | |
|
|
149 | # Location of this file. |
|
|
150 | $webworkFiles{environment} = "$webworkDirs{conf}/global.conf"; |
|
|
151 | |
|
|
152 | # Flat-file database used to protect against MD5 hash collisions. TeX equations |
|
|
153 | # are hashed to determine the name of the image file. There is a tiny chance of |
|
|
154 | # a collision between two TeX strings. This file allows for that. However, this |
|
|
155 | # is slow, so most people chose not to worry about it. Set this to "" if you |
|
|
156 | # don't want to use the equation cache file. |
|
|
157 | $webworkFiles{equationCacheDB} = ""; # "$webworkDirs{DATA}/equationcache"; |
|
|
158 | |
|
|
159 | ##### Hardcopy snippets are used in constructing a TeX file for hardcopy output. |
|
|
160 | ##### They should contain TeX code unless otherwise noted. |
|
|
161 | |
|
|
162 | # The preamble is the first thing in the TeX file. |
|
|
163 | $webworkFiles{hardcopySnippets}{preamble} = "$webworkDirs{conf}/snippets/hardcopyPreamble.tex"; |
|
|
164 | |
|
|
165 | # The setHeader preceeds each set. It is a PG file. |
|
|
166 | $webworkFiles{hardcopySnippets}{setHeader} = "$webworkDirs{conf}/snippets/setHeader.pg"; # hardcopySetHeader.pg", |
|
|
167 | |
|
|
168 | # The problem divider goes between problems. |
|
|
169 | $webworkFiles{hardcopySnippets}{problemDivider} = "$webworkDirs{conf}/snippets/hardcopyProblemDivider.tex"; |
|
|
170 | |
|
|
171 | # The set footer goes after each set. Is is a PG file. |
|
|
172 | $webworkFiles{hardcopySnippets}{setFooter} = "$webworkDirs{conf}/snippets/hardcopySetFooter.pg"; |
|
|
173 | |
|
|
174 | # The set divider goes between sets (in multiset output). |
|
|
175 | $webworkFiles{hardcopySnippets}{setDivider} = "$webworkDirs{conf}/snippets/hardcopySetDivider.tex"; |
|
|
176 | |
|
|
177 | # The user divider does between users (in multiuser output). |
|
|
178 | $webworkFiles{hardcopySnippets}{userDivider} = "$webworkDirs{conf}/snippets/hardcopyUserDivider.tex"; |
|
|
179 | |
|
|
180 | # The postabmle is the last thing in the TeX file. |
|
|
181 | $webworkFiles{hardcopySnippets}{postamble} = "$webworkDirs{conf}/snippets/hardcopyPostamble.tex"; |
|
|
182 | |
|
|
183 | ##### Screen snippets are used when displaying problem sets on the screen. |
|
|
184 | |
|
|
185 | # The set header is displayed on the problem set page. It is a PG file. |
|
|
186 | $webworkFiles{screenSnippets}{setHeader} = "$webworkDirs{conf}/snippets/setHeader.pg"; # screenSetHeader.pg" |
|
|
187 | |
|
|
188 | ################################################################################ |
|
|
189 | # Course-specific files |
|
|
190 | ################################################################################ |
|
|
191 | |
|
|
192 | # The course configuration file. |
|
|
193 | $courseFiles{environment} = "$courseDirs{root}/course.conf"; |
|
|
194 | |
|
|
195 | # File contents are displayed after login, on the problem sets page. Path given |
|
|
196 | # here is relative to the templates directory. |
|
|
197 | $courseFiles{course_info} = "course_info.txt"; |
|
|
198 | |
|
|
199 | # File contents are displayed on the login page. Path given here is relative to |
|
|
200 | # the templates directory. |
|
|
201 | $courseFiles{login_info} = "login_info.txt"; |
|
|
202 | |
|
|
203 | # Additional library buttons can be added to the Library Browser (SetMaker.pm) |
|
|
204 | # by adding the libraries you want to the following line. For each key=>value |
|
|
205 | # in the list, if a directory (or link to a directory) with name 'key' appears |
|
|
206 | # in the templates directory, then a button with name 'value' will be placed at |
|
|
207 | # the top of the problem browser. (No button will appear if there is no |
|
|
208 | # directory or link with the given name in the templates directory.) For |
|
|
209 | # example, |
|
|
210 | # |
|
|
211 | # $courseFiles{problibs} = {rochester => "Rochester", asu => "ASU"}; |
|
|
212 | # |
|
|
213 | # would add two buttons, one for the Rochester library and one for the ASU |
|
|
214 | # library, provided templates/rochester and templates/asu exists. |
|
|
215 | # |
|
|
216 | $courseFiles{problibs} = {}; |
|
|
217 | |
|
|
218 | ################################################################################ |
|
|
219 | # Logs |
|
|
220 | ################################################################################ |
|
|
221 | |
|
|
222 | # FIXME: take logs out of %webworkFiles/%courseFiles and give them their own |
|
|
223 | # top-level hash. |
|
|
224 | |
|
|
225 | # Logs data about how long it takes to process problems. (Do not confuse this |
|
|
226 | # with the /other/ timing log which can be set by WeBWorK::Timing and is used |
|
|
227 | # for benchmarking system performance in general. At some point, this timing |
|
|
228 | # mechanism will be deprecated in favor of the WeBWorK::Timing mechanism.) |
|
|
229 | $webworkFiles{logs}{timing} = "$webworkDirs{logs}/timing.log"; |
|
|
230 | |
|
|
231 | # The transaction log contains data from each recorded answer submission. This |
|
|
232 | # is useful if the database becomes corrupted. |
|
|
233 | $webworkFiles{logs}{transaction} = "$courseDirs{logs}/transaction.log"; |
|
|
234 | |
|
|
235 | # The answer log stores a history of all users' submitted answers. |
|
|
236 | $courseFiles{logs}{answer_log} = "$courseDirs{logs}/answer_log"; |
|
|
237 | |
|
|
238 | ################################################################################ |
|
|
239 | # Mail settings |
|
|
240 | ################################################################################ |
|
|
241 | |
|
|
242 | # Mail sent by the PG system and the mail merge and feedback modules will be |
|
|
243 | # sent via this SMTP server. |
|
|
244 | $mail{smtpServer} = 'mail.yourschool.edu'; |
|
|
245 | |
|
|
246 | # When connecting to the above server, WeBWorK will send this address in the |
|
|
247 | # MAIL FROM command. This has nothing to do with the "From" address on the mail |
|
|
248 | # message. It can really be anything, but some mail servers require it contain |
|
|
249 | # a valid mail domain, or at least be well-formed. |
|
|
250 | $mail{smtpSender} = 'webwork@yourserver.yourschool.edu'; |
|
|
251 | |
|
|
252 | # AllowedRecipients defines addresses that the PG system is allowed to send mail |
|
|
253 | # to. this prevents subtle PG exploits. This should be set in course.conf to the |
|
|
254 | # addresses of professors of each course. Sending mail from the PG system (i.e. |
|
|
255 | # questionaires, essay questions) will fail if this is not set somewhere (either |
|
|
256 | # here or in course.conf). |
|
|
257 | $mail{allowedRecipients} = [ |
|
|
258 | #'prof1@yourserver.yourdomain.edu', |
|
|
259 | #'prof2@yourserver.yourdomain.edu', |
|
|
260 | ]; |
|
|
261 | |
|
|
262 | # If defined, feedbackRecipients overrides the list of recipients for feedback |
|
|
263 | # email. It's appropriate to set this in the course.conf for specific courses, |
|
|
264 | # but probably not in global.conf. if not defined, mail is sent to all |
|
|
265 | # professors and TAs for a given course |
|
|
266 | $mail{feedbackRecipients} = [ |
|
|
267 | #'prof1@yourserver.yourdomain.edu', |
|
|
268 | #'prof2@yourserver.yourdomain.edu', |
|
|
269 | ]; |
|
|
270 | |
|
|
271 | # feedbackVerbosity: |
|
|
272 | # 0: send only the feedback comment and context link |
|
|
273 | # 1: as in 0, plus user, set, problem, and PG data |
|
|
274 | # 2: as in 1, plus the problem environment (debugging data) |
|
|
275 | $mail{feedbackVerbosity} = 1; |
|
|
276 | |
|
|
277 | # Defines the size of the Mail Merge editor window |
|
|
278 | # FIXME: should this be here? it's UI, not mail |
|
|
279 | # FIXME: replace this with the auto-size method that TWiki uses |
|
|
280 | $mail{editor_window_rows} = 15; |
|
|
281 | $mail{editor_window_columns} = 100; |
|
|
282 | |
|
|
283 | ################################################################################ |
|
|
284 | # Paths to external programs |
|
|
285 | ################################################################################ |
|
|
286 | |
|
|
287 | $externalPrograms{mkdir} = "/bin/mkdir"; |
|
|
288 | $externalPrograms{mysql} = "/usr/local/bin/mysql"; |
|
|
289 | |
|
|
290 | $externalPrograms{latex} = "/usr/local/bin/latex"; |
|
|
291 | $externalPrograms{pdflatex} = "/usr/local/bin/pdflatex"; |
|
|
292 | $externalPrograms{dvipng} = "/usr/local/bin/dvipng"; |
|
|
293 | $externalPrograms{tth} = "/usr/local/bin/tth"; |
|
|
294 | |
|
|
295 | # These image conversion utilities are included in the WeBWorK distribution. |
|
|
296 | $externalPrograms{gif2eps} = "$webworkDirs{bin}/gif2eps"; |
|
|
297 | $externalPrograms{png2eps} = "$webworkDirs{bin}/png2eps"; |
|
|
298 | $externalPrograms{gif2png} = "$webworkDirs{bin}/gif2png"; |
|
|
299 | |
|
|
300 | ################################################################################ |
|
|
301 | # Site defaults (FIXME: what other things could be "site defaults"?) |
|
|
302 | ################################################################################ |
|
|
303 | |
|
|
304 | # Status strings -- lists valid status values and their names. If your site uses |
|
|
305 | # additional values, add them here. |
|
|
306 | $siteDefaults{status} = { |
|
|
307 | A => "Audit", |
|
|
308 | audit => "Audit", |
|
|
309 | D => "Drop", |
|
|
310 | drop => "Drop", |
|
|
311 | withdraw => "Drop", |
|
|
312 | C => "Enrolled", |
|
|
313 | current => "Enrolled", |
|
|
314 | enrolled => "Enrolled", |
|
|
315 | }; |
|
|
316 | |
|
|
317 | ################################################################################ |
|
|
318 | # Frontend options |
|
|
319 | ################################################################################ |
|
|
320 | |
|
|
321 | %templates = ( |
|
|
322 | system => "$webworkDirs{conf}/templates/ur.template", |
| 30 | ); |
323 | ); |
| 31 | |
324 | |
| 32 | %webworkFiles = ( |
325 | ################################################################################ |
| 33 | environment => "$webworkDirs{conf}/global.conf", |
326 | # Database options |
| 34 | hardcopySnippets => { |
327 | ################################################################################ |
| 35 | preamble => "$webworkDirs{conf}/hardcopyPreamble.tex", |
328 | |
| 36 | setHeader => "$webworkDirs{conf}/hardcopySetHeader.pg", |
329 | # Several database are defined in the file conf/database.conf and stored in the |
| 37 | problemDivider => "$webworkDirs{conf}/hardcopyProblemDivider.tex", |
330 | # hash %dbLayouts. |
| 38 | setFooter => "$webworkDirs{conf}/hardcopySetFooter.pg", |
331 | include "conf/database.conf"; |
| 39 | setDivider => "$webworkDirs{conf}/hardcopySetDivider.tex", |
332 | |
| 40 | postamble => "$webworkDirs{conf}/hardcopyPostamble.tex", |
333 | # Select the default database layout. This can be overridden in the course.conf |
| 41 | }, |
334 | # file of a particular course. If you choose "gdbm", WeBWorK will be able to |
| 42 | screenSnippets => { |
335 | # use courses from WeBWorK 1 without first adding course.conf files to them. |
| 43 | setHeader => "$webworkDirs{conf}/screenSetHeader.pg", |
336 | # However, the recommended database layout for new courses is "sql". This can |
| 44 | }, |
337 | # be set when creating a course. |
| 45 | logs => { |
338 | $dbLayoutName = "sql"; # or "gdbm"; |
| 46 | timing => "$webworkDirs{logs}/timing.log", |
339 | |
| 47 | }, |
340 | # This sets the symbol "dbLayout" as an alias for the selected database layout. |
|
|
341 | *dbLayout = $dbLayouts{$dbLayoutName}; |
|
|
342 | |
|
|
343 | ################################################################################ |
|
|
344 | # Problem library options |
|
|
345 | ################################################################################ |
|
|
346 | |
|
|
347 | # The directory containing the problem library files. Set to "" if no problem |
|
|
348 | # library is installed. |
|
|
349 | $problemLibrary{root} = ""; |
|
|
350 | |
|
|
351 | # The name of the SQL database containing problem metadata |
|
|
352 | $problemLibrary{sourceSQL} = "ProblemLibrary"; |
|
|
353 | |
|
|
354 | # The user name to use when connecting to the problem library database |
|
|
355 | $problemLibrary{userSQL} = "webworkRead"; |
|
|
356 | |
|
|
357 | # The password to use when connecting to the problem library database |
|
|
358 | $problemLibrary{passwordSQL} = ""; |
|
|
359 | |
|
|
360 | ################################################################################ |
|
|
361 | # Authorization system |
|
|
362 | ################################################################################ |
|
|
363 | |
|
|
364 | # This lets you specify a minimum permission level needed to perform certain |
|
|
365 | # actions. In the current system, >=10 will allow a professor to perform the |
|
|
366 | # action, >=5 will allow a TA to, and >=0 will allow a student to perform an |
|
|
367 | # action (almost never what you want). |
|
|
368 | |
|
|
369 | my $student = 0; |
|
|
370 | my $ta = 5; |
|
|
371 | my $professor = 10; |
|
|
372 | |
|
|
373 | %permissionLevels = ( |
|
|
374 | report_bugs => $student, |
|
|
375 | view_multiple_sets => $ta, |
|
|
376 | view_unopened_sets => $ta, |
|
|
377 | view_unpublished_sets => $ta, |
|
|
378 | view_answers => $ta, |
|
|
379 | become_student => $professor, |
|
|
380 | access_instructor_tools => $ta, |
|
|
381 | create_and_delete_problem_sets => $professor, |
|
|
382 | modify_problem_sets => $professor, |
|
|
383 | assign_problem_sets => $professor, |
|
|
384 | modify_student_data => $professor, |
|
|
385 | score_sets => $professor, |
|
|
386 | send_mail => $professor, |
|
|
387 | modify_classlist_files => $professor, |
|
|
388 | modify_set_def_files => $professor, |
|
|
389 | modify_scoring_files => $professor, |
|
|
390 | modify_problem_template_files => $professor, |
|
|
391 | create_and_delete_courses => $professor, |
|
|
392 | fix_course_databases => $professor, |
| 48 | ); |
393 | ); |
| 49 | |
394 | |
| 50 | %webworkURLs = ( |
|
|
| 51 | root => "$webworkURLRoot", |
|
|
| 52 | home => "http://host.yourdomaon.edu/webwork-info", |
|
|
| 53 | htdocs => "/webwork_files", |
|
|
| 54 | docs => "http://webhost.math.rochester.edu/webworkdocs/docs", |
|
|
| 55 | oldProf => "/webwork-old/profLogin.pl", |
|
|
| 56 | ); |
|
|
| 57 | |
|
|
| 58 | ################################################################################ |
395 | ################################################################################ |
| 59 | # Default course-specific settings |
396 | # Session options |
| 60 | ################################################################################ |
397 | ################################################################################ |
| 61 | |
|
|
| 62 | my $courseRoot = "$webworkDirs{courses}/$courseName"; |
|
|
| 63 | %courseDirs = ( |
|
|
| 64 | root => "$courseRoot", |
|
|
| 65 | DATA => "$courseRoot/DATA", |
|
|
| 66 | auth_DATA => "$courseRoot/DATA/.auth", |
|
|
| 67 | html => "$courseRoot/html", |
|
|
| 68 | html_images => "$courseRoot/html/images", |
|
|
| 69 | html_temp => "$courseRoot/html/tmp", |
|
|
| 70 | logs => "$courseRoot/logs", |
|
|
| 71 | scoring => "$courseRoot/scoring", |
|
|
| 72 | templates => "$courseRoot/templates", |
|
|
| 73 | macros => "$courseRoot/templates/macros", |
|
|
| 74 | ); |
|
|
| 75 | |
|
|
| 76 | %courseFiles = ( |
|
|
| 77 | environment => "$courseDirs{root}/course.conf", |
|
|
| 78 | motd => "$courseDirs{root}/motd.txt", |
|
|
| 79 | ); |
|
|
| 80 | |
|
|
| 81 | # quick hack to fix transaction logging. blah. |
|
|
| 82 | $webworkFiles{logs}->{transaction} = "$courseDirs{logs}/transaction.log"; |
|
|
| 83 | |
|
|
| 84 | my $courseURLRoot = "$webworkURLs{htdocs}/courses/$courseName"; |
|
|
| 85 | %courseURLs = ( |
|
|
| 86 | root => "$courseURLRoot", |
|
|
| 87 | html => "$courseURLRoot", |
|
|
| 88 | html_temp => "$courseURLRoot/tmp", |
|
|
| 89 | ); |
|
|
| 90 | |
|
|
| 91 | ################################################################################ |
|
|
| 92 | # Other site-specific options |
|
|
| 93 | ################################################################################ |
|
|
| 94 | |
|
|
| 95 | %mail = ( |
|
|
| 96 | smtpServer => "mail.math.rochester.edu", |
|
|
| 97 | smtpSender => "webwork\@math.rochester.edu", |
|
|
| 98 | # allowedRecipients defines addresses that the PG system is allowed to |
|
|
| 99 | # send mail to. this prevents subtle PG exploits. This should be set |
|
|
| 100 | # in course.conf to the addresses of professors of each course. Sending |
|
|
| 101 | # mail from the PG system (i.e. questionaires, essay questions) will |
|
|
| 102 | # fail if this is not set somewhere (either here or in course.conf). |
|
|
| 103 | #allowedRecipients => [ |
|
|
| 104 | # "yourname\@host.yourdomain.edu", |
|
|
| 105 | #], |
|
|
| 106 | # if defined, feedbackRecipients overrides the list of recipients for |
|
|
| 107 | # feedback email. It's appropriate to set this in the course.conf for |
|
|
| 108 | # specific courses, but probably not in global.conf. if not defined, |
|
|
| 109 | # mail is sent to all professors and TAs for a given course |
|
|
| 110 | #feedbackRecipients => [ |
|
|
| 111 | # "prof1\@host.yourdomain.edu", |
|
|
| 112 | # "prof2\@host.yourdomain.edu", |
|
|
| 113 | #], |
|
|
| 114 | # feedbackVerbosity: |
|
|
| 115 | # 0: send only the feedback comment and context link |
|
|
| 116 | # 1: as in 0, plus user, set, problem, and PG data |
|
|
| 117 | # 2: as in 1, plus the problem environment (debugging data) |
|
|
| 118 | feedbackVerbosity => 1, |
|
|
| 119 | ); |
|
|
| 120 | |
|
|
| 121 | %externalPrograms = ( |
|
|
| 122 | mkdir => "/bin/mkdir", |
|
|
| 123 | tth => "/usr/local/bin/tth", |
|
|
| 124 | pdflatex => "/usr/local/bin/pdflatex", |
|
|
| 125 | latex => "/usr/local/bin/latex", |
|
|
| 126 | dvipng => "/usr/local/bin/dvipng -mode ljfivemp -D600 -Q6 -x1000.5 -bgTransparent", |
|
|
| 127 | gif2eps => "$webworkDirs{bin}/gif2eps", |
|
|
| 128 | png2eps => "$webworkDirs{bin}/png2eps", |
|
|
| 129 | gif2png => "$webworkDirs{bin}/gif2png", |
|
|
| 130 | ); |
|
|
| 131 | |
|
|
| 132 | ################################################################################ |
|
|
| 133 | # Frontend options |
|
|
| 134 | ################################################################################ |
|
|
| 135 | |
|
|
| 136 | %templates = ( |
|
|
| 137 | system => "$webworkDirs{conf}/barebones.template", |
|
|
| 138 | ); |
|
|
| 139 | |
|
|
| 140 | ################################################################################ |
|
|
| 141 | # Database and session |
|
|
| 142 | ################################################################################ |
|
|
| 143 | |
|
|
| 144 | # dbInfo records some data for the "old" WW/Classlist/Auth.pm database system |
|
|
| 145 | # {auth,wwdb,cldb}_type = database type: GDBM currently implemented |
|
|
| 146 | # {auth_passwd,auth_perm,auth_keys,wwdb,cldb}_file = path to database file |
|
|
| 147 | %dbInfo = ( |
|
|
| 148 | auth_type => "GDBM", |
|
|
| 149 | auth_passwd_file => "$courseDirs{auth_DATA}/$courseName\_password_DB", |
|
|
| 150 | auth_perm_file => "$courseDirs{auth_DATA}/$courseName\_permissions_DB", |
|
|
| 151 | auth_keys_file => "$courseDirs{auth_DATA}/keys", |
|
|
| 152 | wwdb_type => "GDBM", |
|
|
| 153 | wwdb_file => "$courseDirs{DATA}/$courseName\_webwork_DB", |
|
|
| 154 | cldb_type => "GDBM", |
|
|
| 155 | cldb_file => "$courseDirs{DATA}/$courseName\_classlist_DB", |
|
|
| 156 | psvn_digits => 5, |
|
|
| 157 | ); |
|
|
| 158 | |
|
|
| 159 | # dbLayout records the schema and source for each table in the "new" DB.pm |
|
|
| 160 | # database system. consult DB.pm for the authoritative list of tables. |
|
|
| 161 | # schema = perl module to use for access to the table |
|
|
| 162 | # driver = perl module to use for access to the data source |
|
|
| 163 | # source = location of data source (i.e. path, url, DBI spec) |
|
|
| 164 | # params = extra information needed by the schema (optional) |
|
|
| 165 | # note: schema and driver must have the same interface. |
|
|
| 166 | %dbLayout = ( |
|
|
| 167 | password => { |
|
|
| 168 | record => "WeBWorK::DB::Record::Password", |
|
|
| 169 | schema => "WeBWorK::DB::Schema::Auth1Hash", |
|
|
| 170 | driver => "WeBWorK::DB::Driver::GDBM", |
|
|
| 171 | source => "$courseDirs{auth_DATA}/$courseName\_password_DB", |
|
|
| 172 | }, |
|
|
| 173 | permission => { |
|
|
| 174 | record => "WeBWorK::DB::Record::PermissionLevel", |
|
|
| 175 | schema => "WeBWorK::DB::Schema::Auth1Hash", |
|
|
| 176 | driver => "WeBWorK::DB::Driver::GDBM", |
|
|
| 177 | source => "$courseDirs{auth_DATA}/$courseName\_permissions_DB", |
|
|
| 178 | }, |
|
|
| 179 | key => { |
|
|
| 180 | record => "WeBWorK::DB::Record::Key", |
|
|
| 181 | schema => "WeBWorK::DB::Schema::Auth1Hash", |
|
|
| 182 | driver => "WeBWorK::DB::Driver::GDBM", |
|
|
| 183 | source => "$courseDirs{auth_DATA}/keys", |
|
|
| 184 | }, |
|
|
| 185 | user => { |
|
|
| 186 | record => "WeBWorK::DB::Record::User", |
|
|
| 187 | schema => "WeBWorK::DB::Schema::Classlist1Hash", |
|
|
| 188 | driver => "WeBWorK::DB::Driver::GDBM", |
|
|
| 189 | source => "$courseDirs{DATA}/$courseName\_classlist_DB", |
|
|
| 190 | }, |
|
|
| 191 | set => { |
|
|
| 192 | record => "WeBWorK::DB::Record::Set", |
|
|
| 193 | schema => "WeBWorK::DB::Schema::Null", |
|
|
| 194 | driver => "WeBWorK::DB::Driver::Null", |
|
|
| 195 | source => undef, |
|
|
| 196 | }, |
|
|
| 197 | set_user => { |
|
|
| 198 | record => "WeBWorK::DB::Record::UserSet", |
|
|
| 199 | schema => "WeBWorK::DB::Schema::WW1Hash", |
|
|
| 200 | driver => "WeBWorK::DB::Driver::GDBM", |
|
|
| 201 | source => "$courseDirs{DATA}/$courseName\_webwork_DB", |
|
|
| 202 | params => { psvnLength => 5 }, |
|
|
| 203 | }, |
|
|
| 204 | problem => { |
|
|
| 205 | record => "WeBWorK::DB::Record::Problem", |
|
|
| 206 | schema => "WeBWorK::DB::Schema::Null", |
|
|
| 207 | driver => "WeBWorK::DB::Driver::Null", |
|
|
| 208 | source => undef, |
|
|
| 209 | }, |
|
|
| 210 | problem_user => { |
|
|
| 211 | record => "WeBWorK::DB::Record::UserProblem", |
|
|
| 212 | schema => "WeBWorK::DB::Schema::WW1Hash", |
|
|
| 213 | driver => "WeBWorK::DB::Driver::GDBM", |
|
|
| 214 | source => "$courseDirs{DATA}/$courseName\_webwork_DB", |
|
|
| 215 | params => { psvnLength => 5 }, |
|
|
| 216 | }, |
|
|
| 217 | ); |
|
|
| 218 | |
|
|
| 219 | # This lets you specify a minimum permission level needed to perform |
|
|
| 220 | # certain actions. In the current system, >=10 will allow a professor |
|
|
| 221 | # to perform the action, >=5 will allow a TA to, and >=0 will allow a |
|
|
| 222 | # student to perform an action (almost never what you want). |
|
|
| 223 | %permissionLevels = ( |
|
|
| 224 | "become_student" => 10, |
|
|
| 225 | ); |
|
|
| 226 | |
398 | |
| 227 | # $sessionKeyTimeout defines seconds of inactivity before a key expires |
399 | # $sessionKeyTimeout defines seconds of inactivity before a key expires |
| 228 | $sessionKeyTimeout = 60*30; |
400 | $sessionKeyTimeout = 60*30; |
| 229 | |
401 | |
| 230 | # $sessionKeyLength defines the length (in characters) of the session key |
402 | # $sessionKeyLength defines the length (in characters) of the session key |
| … | |
… | |
| 242 | # kindof a backdoor to the practice user system, since he doesn't have a |
414 | # kindof a backdoor to the practice user system, since he doesn't have a |
| 243 | # password. Come to think of it, why do we even have this?! |
415 | # password. Come to think of it, why do we even have this?! |
| 244 | #$debugPracticeUser = "practice666"; |
416 | #$debugPracticeUser = "practice666"; |
| 245 | |
417 | |
| 246 | ################################################################################ |
418 | ################################################################################ |
| 247 | # PG translation options |
419 | # PG subsystem options |
| 248 | ################################################################################ |
420 | ################################################################################ |
| 249 | |
421 | |
| 250 | %pg = ( |
422 | # List of enabled display modes. Comment out any modes you don't wish to make |
| 251 | options => { |
423 | # available for use. |
| 252 | # default translation options |
424 | $pg{displayModes} = [ |
|
|
425 | "plainText", # display raw TeX for math expressions |
|
|
426 | "formattedText", # format math expressions using TtH |
|
|
427 | "images", # display math expressions as images generated by dvipng |
|
|
428 | "jsMath", # render TeX math expressions on the client side using jsMath |
|
|
429 | "asciimath", # render TeX math expressions on the client side using ASCIIMathML |
|
|
430 | ]; |
|
|
431 | |
|
|
432 | #### Default settings for the PG translator |
|
|
433 | |
|
|
434 | # Default display mode. Should be listed above. |
| 253 | displayMode => "images", |
435 | $pg{options}{displayMode} = "images"; |
| 254 | showOldAnswers => 1, |
436 | |
| 255 | showCorrectAnswers => 0, |
437 | # The default grader to use, if a problem doesn't specify. |
| 256 | showHints => 0, |
438 | $pg{options}{grader} = "avg_problem_grader"; |
| 257 | showSolutions => 0, |
439 | |
| 258 | catchWarnings => 1, |
440 | # Fill in answer blanks with the student's last answer by default? |
| 259 | # default grader |
441 | $pg{options}{showOldAnswers} = 1; |
| 260 | grader => "avg_problem_grader", |
442 | |
|
|
443 | # Show correct answers (when allowed) by default? |
|
|
444 | $pg{options}{showCorrectAnswers} = 0; |
|
|
445 | |
|
|
446 | # Show hints (when allowed) by default? |
|
|
447 | $pg{options}{showHints} = 0; |
|
|
448 | |
|
|
449 | # Show solutions (when allowed) by default? |
|
|
450 | $pg{options}{showSolutions} = 0; |
|
|
451 | |
|
|
452 | # Catch translation warnings internally by default? (We no longer need to do |
|
|
453 | # this, since there is a global warnings handler. So this should be off.) |
|
|
454 | $pg{options}{catchWarnings} = 0; |
|
|
455 | |
|
|
456 | ##### Currently-selected renderer |
|
|
457 | |
|
|
458 | # Only the local renderer is supported in this version. |
|
|
459 | $pg{renderer} = "WeBWorK::PG::Local"; |
|
|
460 | |
|
|
461 | # The remote renderer connects to an XML-RPC PG rendering server. |
|
|
462 | #$pg{renderer} = "WeBWorK::PG::Remote"' |
|
|
463 | |
|
|
464 | ##### Renderer-dependent options |
|
|
465 | |
|
|
466 | # The remote renderer has one option: |
|
|
467 | $pg{renderers}{"WeBWorK::PG::Remote"} = { |
|
|
468 | # The "proxy" server to connect to for remote rendering. |
|
|
469 | proxy => "http://localhost:21000/RenderD", |
|
|
470 | }; |
|
|
471 | |
|
|
472 | ##### Settings for various display modes |
|
|
473 | |
|
|
474 | # "images" mode has several settings: |
|
|
475 | $pg{displayModeOptions}{images} = { |
|
|
476 | # Determines the method used to align images in output. Can be |
|
|
477 | # "baseline", "absmiddle", or "mysql". |
|
|
478 | dvipng_align => 'baseline', |
|
|
479 | |
|
|
480 | # If we choose mysql, we need information on connecting to the |
|
|
481 | # database. Whatever you use here, you have to create the database |
|
|
482 | # and grant read/write priveleges to the user listed here. To create |
|
|
483 | # the database in mysql, as root use: |
|
|
484 | # |
|
|
485 | # CREATE DATABASE DvipngDepths; |
|
|
486 | # USE DvipngDepths; |
|
|
487 | # CREATE TABLE depths (md5 CHAR(33) NOT NULL, depth SMALLINT, PRIMARY KEY (md5)); |
|
|
488 | # GRANT ALL ON DvipngDepths.* TO webworkWrite; |
|
|
489 | # |
|
|
490 | # In the last statement, "webworkWrite" should match the user below. |
|
|
491 | dvipng_depth_db => { |
|
|
492 | dbsource => 'dbi:mysql:DvipngDepths', |
|
|
493 | user => $dbLayouts{sql}->{password}->{params}->{usernameRW}, |
|
|
494 | passwd => $dbLayouts{sql}->{password}->{params}->{passwordRW}, |
| 261 | }, |
495 | }, |
| 262 | # modules lists module names and the packages each contains |
496 | }; |
| 263 | modules => [ |
497 | |
|
|
498 | ##### Directories used by PG |
|
|
499 | |
|
|
500 | # The root of the PG directory tree (from pg_root in Apache config). |
|
|
501 | $pg{directories}{root} = "$pg_dir"; |
|
|
502 | $pg{directories}{lib} = "$pg{directories}{root}/lib"; |
|
|
503 | $pg{directories}{macros} = "$pg{directories}{root}/macros"; |
|
|
504 | |
|
|
505 | ##### "Special" PG environment variables. (Stuff that doesn't fit in anywhere else.) |
|
|
506 | |
|
|
507 | # Users for whom to print the file name of the PG file being processed. |
|
|
508 | $pg{specialPGEnvironmentVars}{PRINT_FILE_NAMES_FOR} = [ "professor", ]; |
|
|
509 | |
|
|
510 | # Locations of CAPA resources. (Only necessary if you need to use converted CAPA |
|
|
511 | # problems.) |
|
|
512 | $pg{specialPGEnvironmentVars}{CAPA_Tools} = "$courseDirs{macros}/CAPA_Tools/", |
|
|
513 | $pg{specialPGEnvironmentVars}{CAPA_MCTools} = "$courseDirs{macros}/CAPA_MCTools/", |
|
|
514 | $pg{specialPGEnvironmentVars}{CAPA_GraphicsDirectory} = "$courseDirs{html}/CAPA_Graphics/", |
|
|
515 | $pg{specialPGEnvironmentVars}{CAPA_Graphics_URL} = "$courseURLs{html}/CAPA_Graphics/", |
|
|
516 | |
|
|
517 | # Size in pixels of dynamically-generated images, i.e. graphs. |
|
|
518 | $pg{specialPGEnvironmentVars}{onTheFlyImageSize} = 400, |
|
|
519 | |
|
|
520 | ##### PG modules to load |
|
|
521 | |
|
|
522 | # The first item of each list is the module to load. The remaining items are |
|
|
523 | # additional packages to import. |
|
|
524 | |
|
|
525 | ${pg}{modules} = [ |
| 264 | [qw(DynaLoader)], |
526 | [qw(DynaLoader)], |
| 265 | [qw(Exporter)], |
527 | [qw(Exporter)], |
| 266 | [qw(GD)], |
528 | [qw(GD)], |
| 267 | |
529 | |
| 268 | [qw(AlgParser AlgParserWithImplicitExpand Expr ExprWithImplicitExpand)], |
530 | [qw(AlgParser AlgParserWithImplicitExpand Expr ExprWithImplicitExpand)], |
| 269 | [qw(AnswerHash AnswerEvaluator)], |
531 | [qw(AnswerHash AnswerEvaluator)], |
| 270 | [qw(WWPlot)], # required by Circle (and others) |
532 | [qw(WWPlot)], # required by Circle (and others) |
| 271 | [qw(Circle)], |
533 | [qw(Circle)], |
| 272 | [qw(Complex)], |
534 | [qw(Complex)], |
| 273 | [qw(Complex1)], |
535 | [qw(Complex1)], |
| 274 | [qw(Distributions)], |
536 | [qw(Distributions)], |
| 275 | [qw(Fraction)], |
537 | [qw(Fraction)], |
| 276 | [qw(Fun)], |
538 | [qw(Fun)], |
| 277 | [qw(Hermite)], |
539 | [qw(Hermite)], |
| 278 | [qw(Label)], |
540 | [qw(Label)], |
| 279 | [qw(List)], |
541 | [qw(List)], |
| 280 | [qw(Match)], |
542 | [qw(Match)], |
| 281 | [qw(MatrixReal1)], # required by Matrix |
543 | [qw(MatrixReal1)], # required by Matrix |
| 282 | [qw(Matrix)], |
544 | [qw(Matrix)], |
| 283 | [qw(Multiple)], |
545 | [qw(Multiple)], |
| 284 | [qw(PGrandom)], |
546 | [qw(PGrandom)], |
| 285 | [qw(Regression)], |
547 | [qw(Regression)], |
| 286 | [qw(Select)], |
548 | [qw(Select)], |
| 287 | [qw(Units)], |
549 | [qw(Units)], |
| 288 | [qw(VectorField)], |
550 | [qw(VectorField)], |
| 289 | ], |
551 | ]; |
| 290 | # defaults used by answer evaluators |
552 | |
|
|
553 | ##### Answer evaluatior defaults |
|
|
554 | |
| 291 | ansEvalDefaults => { |
555 | $pg{ansEvalDefaults} = { |
| 292 | functAbsTolDefault => .001, |
556 | functAbsTolDefault => .001, |
| 293 | functLLimitDefault => .0000001, |
557 | functLLimitDefault => .0000001, |
| 294 | functMaxConstantOfIntegration => 1E8, |
558 | functMaxConstantOfIntegration => 1E8, |
| 295 | functNumOfPoints => 3, |
559 | functNumOfPoints => 3, |
| 296 | functRelPercentTolDefault => .1, |
560 | functRelPercentTolDefault => .1, |
| 297 | functULimitDefault => .9999999, |
561 | functULimitDefault => .9999999, |
| 298 | functVarDefault => "x", |
562 | functVarDefault => "x", |
| 299 | functZeroLevelDefault => 1E-14, |
563 | functZeroLevelDefault => 1E-14, |
| 300 | functZeroLevelTolDefault => 1E-12, |
564 | functZeroLevelTolDefault => 1E-12, |
| 301 | numAbsTolDefault => .001, |
565 | numAbsTolDefault => .001, |
| 302 | numFormatDefault => "", |
566 | numFormatDefault => "", |
| 303 | numRelPercentTolDefault => .1, |
567 | numRelPercentTolDefault => .1, |
| 304 | numZeroLevelDefault => 1E-14, |
568 | numZeroLevelDefault => 1E-14, |
| 305 | numZeroLevelTolDefault => 1E-12, |
569 | numZeroLevelTolDefault => 1E-12, |
| 306 | }, |
570 | useBaseTenLog => 0, |
| 307 | ); |
571 | defaultDisplayMatrixStyle => "[s]", |
|
|
572 | }; |
|
|
573 | |
|
|
574 | ################################################################################ |
|
|
575 | # Compatibility |
|
|
576 | ################################################################################ |
|
|
577 | |
|
|
578 | # Define the old names for the various "root" variables. |
|
|
579 | $webworkRoot = $webworkDirs{root}; |
|
|
580 | $webworkURLRoot = $webworkURLs{root}; |
|
|
581 | $pgRoot = $pg{directories}{root}; |