[system] / branches / rel-2-4-patches / webwork2 / conf / global.conf.dist Repository:
ViewVC logotype

Annotation of /branches/rel-2-4-patches/webwork2/conf/global.conf.dist

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3604 - (view) (download)
Original Path: trunk/webwork2/conf/global.conf.dist

1 : sh002i 1801 #!perl
2 : sh002i 654 ################################################################################
3 : sh002i 1663 # WeBWorK Online Homework Delivery System
4 :     # Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/
5 : gage 3604 # $CVSHeader: webwork-modperl/conf/global.conf.dist,v 1.134 2005/08/28 20:54:50 jj Exp $
6 : sh002i 1663 #
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.
16 : sh002i 654 ################################################################################
17 :    
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.
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,
22 : sh002i 2515 # use the "my" keyword. The $webwork_dir variable is set in the WeBWorK Apache
23 :     # configuration file (webwork.apache-config) and is available for use here. In
24 :     # addition, the $courseName variable holds the name of the current course.
25 : sh002i 654
26 :     ################################################################################
27 : sh002i 2515 # Seed variables
28 :     ################################################################################
29 :    
30 : sh002i 2520 # Set these variables to correspond to your configuration and preferences. You
31 : sh002i 3124 # will need to restart the webserver to reset the variables in this section.
32 : sh002i 2515
33 :     # URL of WeBWorK handler.
34 :     $webwork_url = "/webwork2";
35 :    
36 :     # Root directory of PG.
37 : sh002i 2516 $pg_dir = "/opt/pg";
38 : sh002i 2515
39 :     # URL and path to htdocs directory.
40 :     $webwork_htdocs_url = "/webwork2_files";
41 :     $webwork_htdocs_dir = "$webwork_dir/htdocs";
42 :    
43 :     # URL and path to courses directory.
44 :     $webwork_courses_url = "/webwork2_course_files";
45 :     $webwork_courses_dir = "$webwork_dir/courses";
46 :    
47 :     ################################################################################
48 : sh002i 2508 # Paths to external programs
49 :     ################################################################################
50 :    
51 :     $externalPrograms{mkdir} = "/bin/mkdir";
52 : sh002i 3124 $externalPrograms{mv} = "/bin/mv";
53 : sh002i 3389 $externalPrograms{mysql} = "/usr/bin/mysql";
54 : sh002i 2508
55 : sh002i 3389 $externalPrograms{latex} = "/usr/bin/latex";
56 :     $externalPrograms{pdflatex} = "/usr/bin/pdflatex --shell-escape"; # allows pdflatex to handle .eps files
57 :     $externalPrograms{dvipng} = "/usr/bin/dvipng";
58 :     $externalPrograms{tth} = "/usr/bin/tth";
59 : sh002i 2508
60 : dpvc 3330 $externalPrograms{tar} = "/usr/bin/tar";
61 :    
62 : jj 3546 # Basic image manipulation utilities
63 : gage 3604
64 :     ####################################################
65 : jj 3546 # Most sites only need to configure the first line
66 : gage 3604 ####################################################
67 : sh002i 3581 my $netpbm_prefix = "/usr/bin";
68 :     $externalPrograms{giftopnm} = "$netpbm_prefix/giftopnm";
69 :     $externalPrograms{ppmtopgm} = "$netpbm_prefix/ppmtopgm";
70 :     $externalPrograms{pnmtops} = "$netpbm_prefix/pnmtops";
71 :     $externalPrograms{pnmtopng} = "$netpbm_prefix/pnmtopng";
72 :     $externalPrograms{pngtopnm} = "$netpbm_prefix/pngtopnm";
73 : jj 3546
74 :     # The following lines are the external scripts gif2eps, etc.
75 :     # The source file is input with cat, and the output is redirected to
76 :     # the desired file.
77 :    
78 : gage 3604 $externalPrograms{gif2eps} = "$externalPrograms{giftopnm} | $externalPrograms{ppmtopgm}| $externalPrograms{pnmtops} -noturn 2>/dev/null";
79 : jj 3546 $externalPrograms{png2eps} = "$externalPrograms{pngtopnm} | $externalPrograms{ppmtopgm} | $externalPrograms{pnmtops} -noturn 2>/dev/null";
80 :     $externalPrograms{gif2png} = "$externalPrograms{giftopnm} | $externalPrograms{pnmtopng}";
81 :    
82 :     # Note on these conversions:
83 :     # we used to use `pnmdepth 1' instead of ppmtopgm as it creates a
84 :     # monochrome image (1 bit) rather than a greyscale image (8 bits).
85 :     # However, this was causing improper display of some sort in PDFs.
86 :    
87 :    
88 : gage 3604
89 :    
90 : sh002i 2508 ################################################################################
91 :     # Mail settings
92 :     ################################################################################
93 :    
94 :     # Mail sent by the PG system and the mail merge and feedback modules will be
95 :     # sent via this SMTP server.
96 : gage 3604 $mail{smtpServer} = 'mail.rochester.edu';
97 : sh002i 2508
98 :     # When connecting to the above server, WeBWorK will send this address in the
99 :     # MAIL FROM command. This has nothing to do with the "From" address on the mail
100 :     # message. It can really be anything, but some mail servers require it contain
101 :     # a valid mail domain, or at least be well-formed.
102 :     $mail{smtpSender} = 'webwork@yourserver.yourschool.edu';
103 :    
104 :     # AllowedRecipients defines addresses that the PG system is allowed to send mail
105 :     # to. this prevents subtle PG exploits. This should be set in course.conf to the
106 :     # addresses of professors of each course. Sending mail from the PG system (i.e.
107 :     # questionaires, essay questions) will fail if this is not set somewhere (either
108 :     # here or in course.conf).
109 :     $mail{allowedRecipients} = [
110 :     #'prof1@yourserver.yourdomain.edu',
111 :     #'prof2@yourserver.yourdomain.edu',
112 :     ];
113 :    
114 :     # If defined, feedbackRecipients overrides the list of recipients for feedback
115 :     # email. It's appropriate to set this in the course.conf for specific courses,
116 :     # but probably not in global.conf. if not defined, mail is sent to all
117 :     # professors and TAs for a given course
118 : sh002i 2690 #$mail{feedbackRecipients} = [
119 :     # 'prof1@yourserver.yourdomain.edu',
120 :     # 'prof2@yourserver.yourdomain.edu',
121 :     #];
122 : sh002i 2508
123 :     # feedbackVerbosity:
124 :     # 0: send only the feedback comment and context link
125 :     # 1: as in 0, plus user, set, problem, and PG data
126 :     # 2: as in 1, plus the problem environment (debugging data)
127 :     $mail{feedbackVerbosity} = 1;
128 :    
129 :     # Defines the size of the Mail Merge editor window
130 :     # FIXME: should this be here? it's UI, not mail
131 :     # FIXME: replace this with the auto-size method that TWiki uses
132 :     $mail{editor_window_rows} = 15;
133 :     $mail{editor_window_columns} = 100;
134 :    
135 :     ################################################################################
136 : sh002i 2438 # System-wide locations (directories and URLs)
137 : sh002i 663 ################################################################################
138 : sh002i 654
139 : sh002i 2438 # The root directory, set by webwork_root variable in Apache configuration.
140 : sh002i 2491 $webworkDirs{root} = "$webwork_dir";
141 : sh002i 654
142 : sh002i 2438 # Location of system-wide data files.
143 :     $webworkDirs{DATA} = "$webworkDirs{root}/DATA";
144 : sh002i 654
145 : sh002i 2438 # Used for temporary storage of uploaded files.
146 :     $webworkDirs{uploadCache} = "$webworkDirs{DATA}/uploads";
147 : sh002i 654
148 : sh002i 2438 # Location of utility programs.
149 :     $webworkDirs{bin} = "$webworkDirs{root}/bin";
150 :    
151 :     # Location of configuration files, templates, snippets, etc.
152 :     $webworkDirs{conf} = "$webworkDirs{root}/conf";
153 :    
154 :     # Location of course directories.
155 : sh002i 2491 $webworkDirs{courses} = "$webwork_courses_dir" || "$webworkDirs{root}/courses";
156 : sh002i 2438
157 :     # Contains log files.
158 :     $webworkDirs{logs} = "$webworkDirs{root}/logs";
159 :    
160 :     # Contains non-web-accessible temporary files, such as TeX working directories.
161 :     $webworkDirs{tmp} = "$webworkDirs{root}/tmp";
162 :    
163 : dpvc 3330 # The (absolute) destinations of symbolic links that are OK for the FileManager to follow.
164 :     # (any subdirectory of these is a valid target for a symbolic link.)
165 :     # For example:
166 :     # $webworkDirs{valid_symlinks} = ["$webworkDirs{courses}/modelCourse/templates","/ww2/common/sets"];
167 :     $webworkDirs{valid_symlinks} = [];
168 :    
169 : sh002i 2438 ##### The following locations are web-accessible.
170 :    
171 :     # The root URL (usually /webwork2), set by <Location> in Apache configuration.
172 : sh002i 2491 $webworkURLs{root} = "$webwork_url";
173 : sh002i 2438
174 :     # Location of system-wide web-accessible files, such as equation images, and
175 :     # help files.
176 : sh002i 2491 $webworkDirs{htdocs} = "$webwork_htdocs_dir" || "$webworkDirs{root}/htdocs";
177 :     $webworkURLs{htdocs} = "$webwork_htdocs_url";
178 : sh002i 2438
179 :     # Location of web-accessible temporary files, such as equation images.
180 :     $webworkDirs{htdocs_temp} = "$webworkDirs{htdocs}/tmp";
181 :     $webworkURLs{htdocs_temp} = "$webworkURLs{htdocs}/tmp";
182 :    
183 :     # Location of cached equation images.
184 :     $webworkDirs{equationCache} = "$webworkDirs{htdocs_temp}/equations";
185 :     $webworkURLs{equationCache} = "$webworkURLs{htdocs_temp}/equations";
186 :    
187 :     # Contains context-sensitive help files.
188 :     $webworkDirs{local_help} = "$webworkDirs{htdocs}/helpFiles";
189 :     $webworkURLs{local_help} = "$webworkURLs{htdocs}/helpFiles";
190 :    
191 :     # URL of general WeBWorK documentation.
192 :     $webworkURLs{docs} = "http://webhost.math.rochester.edu/webworkdocs/docs";
193 :    
194 :     # URL of WeBWorK 1.x profLogin.pl script, for access to old professor pages.
195 :     # Note that both systems must share a single "courses" directory for this to be
196 :     # useful. Leave this blank to disable
197 :     $webworkURLs{oldProf} = "/webwork1/profLogin.pl";
198 :    
199 :     # URL of WeBWorK Bugzilla database.
200 : sh002i 2694 $webworkURLs{bugReporter} = "http://bugs.webwork.rochester.edu/";
201 : sh002i 2438
202 : sh002i 3124 # Location of CSS
203 :     $webworkURLs{stylesheet} = "$webworkURLs{htdocs}/css/ur.css";
204 :    
205 : sh002i 2438 # Location of jsMath script, used for the jsMath display mode.
206 : dpvc 3538 $webworkURLs{jsMath} = "$webworkURLs{htdocs}/jsMath/jsMath-ww.js";
207 : sh002i 2438
208 :     # Location of ASCIIMathML script, used for the asciimath display mode.
209 : dpvc 2441 $webworkURLs{asciimath} = "$webworkURLs{htdocs}/ASCIIMathML/ASCIIMathML.js";
210 : sh002i 2438
211 : sh002i 663 ################################################################################
212 : sh002i 2438 # Defaults for course-specific locations (directories and URLs)
213 : sh002i 663 ################################################################################
214 :    
215 : sh002i 2438 # The root directory of the current course. (The ID of the current course is
216 :     # available in $courseName.)
217 :     $courseDirs{root} = "$webworkDirs{courses}/$courseName";
218 : sh002i 663
219 : sh002i 2438 # Location of course-specific data files, such as WW1 (GDBM) database files.
220 :     $courseDirs{DATA} = "$courseDirs{root}/DATA";
221 : sh002i 663
222 : sh002i 2438 # Location of authentication data files when using a WW1 (GDBM) database.
223 :     $courseDirs{auth_DATA} = "$courseDirs{DATA}/.auth";
224 :    
225 :     # Location of course HTML files, passed to PG.
226 :     $courseDirs{html} = "$courseDirs{root}/html";
227 : sh002i 2491 $courseURLs{html} = "$webwork_courses_url/$courseName";
228 : sh002i 2438
229 :     # Location of course image files, passed to PG.
230 :     $courseDirs{html_images} = "$courseDirs{html}/images";
231 :    
232 :     # Location of web-accessible, course-specific temporary files, like static and
233 :     # dynamically-generated PG graphics.
234 :     $courseDirs{html_temp} = "$courseDirs{html}/tmp";
235 :     $courseURLs{html_temp} = "$courseURLs{html}/tmp";
236 :    
237 :     # Location of course-specific logs, like the transaction log.
238 :     $courseDirs{logs} = "$courseDirs{root}/logs";
239 :    
240 :     # Location of scoring files.
241 :     $courseDirs{scoring} = "$courseDirs{root}/scoring";
242 :    
243 :     # Location of PG templates and set definition files.
244 :     $courseDirs{templates} = "$courseDirs{root}/templates";
245 :    
246 :     # Location of course-specific macro files.
247 :     $courseDirs{macros} = "$courseDirs{templates}/macros";
248 :    
249 :     # Location of mail-merge templates.
250 :     $courseDirs{email} = "$courseDirs{templates}/email";
251 :    
252 :     ################################################################################
253 :     # System-wide files
254 :     ################################################################################
255 :    
256 :     # Location of this file.
257 :     $webworkFiles{environment} = "$webworkDirs{conf}/global.conf";
258 :    
259 :     # Flat-file database used to protect against MD5 hash collisions. TeX equations
260 :     # are hashed to determine the name of the image file. There is a tiny chance of
261 :     # a collision between two TeX strings. This file allows for that. However, this
262 :     # is slow, so most people chose not to worry about it. Set this to "" if you
263 :     # don't want to use the equation cache file.
264 :     $webworkFiles{equationCacheDB} = ""; # "$webworkDirs{DATA}/equationcache";
265 :    
266 :     ##### Hardcopy snippets are used in constructing a TeX file for hardcopy output.
267 :     ##### They should contain TeX code unless otherwise noted.
268 :    
269 :     # The preamble is the first thing in the TeX file.
270 :     $webworkFiles{hardcopySnippets}{preamble} = "$webworkDirs{conf}/snippets/hardcopyPreamble.tex";
271 :    
272 :     # The setHeader preceeds each set. It is a PG file.
273 : gage 2447 $webworkFiles{hardcopySnippets}{setHeader} = "$webworkDirs{conf}/snippets/setHeader.pg"; # hardcopySetHeader.pg",
274 : sh002i 2438
275 :     # The problem divider goes between problems.
276 :     $webworkFiles{hardcopySnippets}{problemDivider} = "$webworkDirs{conf}/snippets/hardcopyProblemDivider.tex";
277 :    
278 :     # The set footer goes after each set. Is is a PG file.
279 :     $webworkFiles{hardcopySnippets}{setFooter} = "$webworkDirs{conf}/snippets/hardcopySetFooter.pg";
280 :    
281 :     # The set divider goes between sets (in multiset output).
282 :     $webworkFiles{hardcopySnippets}{setDivider} = "$webworkDirs{conf}/snippets/hardcopySetDivider.tex";
283 :    
284 :     # The user divider does between users (in multiuser output).
285 :     $webworkFiles{hardcopySnippets}{userDivider} = "$webworkDirs{conf}/snippets/hardcopyUserDivider.tex";
286 :    
287 :     # The postabmle is the last thing in the TeX file.
288 :     $webworkFiles{hardcopySnippets}{postamble} = "$webworkDirs{conf}/snippets/hardcopyPostamble.tex";
289 :    
290 :     ##### Screen snippets are used when displaying problem sets on the screen.
291 :    
292 :     # The set header is displayed on the problem set page. It is a PG file.
293 : gage 2447 $webworkFiles{screenSnippets}{setHeader} = "$webworkDirs{conf}/snippets/setHeader.pg"; # screenSetHeader.pg"
294 : sh002i 2438
295 : sh002i 3124 # A PG template for creation of new problems.
296 : gage 3069 $webworkFiles{screenSnippets}{blankProblem} = "$webworkDirs{conf}/snippets/blankProblem.pg"; # screenSetHeader.pg"
297 :    
298 : gage 3237 # A site info "message of the day" file
299 :     $webworkFiles{site_info} = "$webworkDirs{htdocs}/site_info.txt";
300 : sh002i 2438 ################################################################################
301 :     # Course-specific files
302 :     ################################################################################
303 :    
304 :     # The course configuration file.
305 :     $courseFiles{environment} = "$courseDirs{root}/course.conf";
306 :    
307 :     # File contents are displayed after login, on the problem sets page. Path given
308 :     # here is relative to the templates directory.
309 :     $courseFiles{course_info} = "course_info.txt";
310 :    
311 :     # File contents are displayed on the login page. Path given here is relative to
312 :     # the templates directory.
313 :     $courseFiles{login_info} = "login_info.txt";
314 :    
315 :     # Additional library buttons can be added to the Library Browser (SetMaker.pm)
316 :     # by adding the libraries you want to the following line. For each key=>value
317 :     # in the list, if a directory (or link to a directory) with name 'key' appears
318 :     # in the templates directory, then a button with name 'value' will be placed at
319 :     # the top of the problem browser. (No button will appear if there is no
320 :     # directory or link with the given name in the templates directory.) For
321 :     # example,
322 :     #
323 :     # $courseFiles{problibs} = {rochester => "Rochester", asu => "ASU"};
324 :     #
325 :     # would add two buttons, one for the Rochester library and one for the ASU
326 : sh002i 2694 # library, provided templates/rochester and templates/asu exists either as
327 :     # subdirectories or links to other directories.
328 : sh002i 2438 #
329 : sh002i 2694 $courseFiles{problibs} = {
330 :     # rochesterLibrary => "Rochester",
331 :     # asuLibrary => "Arizona State",
332 :     # dcdsLibrary => "Detroit CDS",
333 :     # dartmouthLibrary => "Dartmouth",
334 :     # indianaLibrary => "Indiana",
335 :     # osuLibrary => "Ohio State",
336 : sh002i 2722 # capaLibrary => "CAPA",
337 : sh002i 2694 };
338 : dpvc 2431
339 : sh002i 2438 ################################################################################
340 : sh002i 3124 # Database options (WWDBv3)
341 : sh002i 2508 ################################################################################
342 :    
343 : sh002i 3124 # The four arguments passed to the DBI::connect() method. See the DBI manual for
344 :     # more information.
345 :     $wwdbv3_settings{dsn} = "dbi:mysql:wwdbv3";
346 :     $wwdbv3_settings{user} = "wwdbv3";
347 :     $wwdbv3_settings{pass} = "xyzzy";
348 :     $wwdbv3_settings{attr} = {};
349 :    
350 :     # WWDBv3 needs a lock file to prevent concurrent database upgrades. The file
351 :     # will be locked with flock().
352 :     $wwdbv3_settings{upgrade_lock} = "$webworkDirs{tmp}/wwdbv3_upgrade.lock";
353 :    
354 :     ################################################################################
355 :     # Database options (WWDBv2)
356 :     ################################################################################
357 :    
358 : sh002i 2508 # Several database are defined in the file conf/database.conf and stored in the
359 :     # hash %dbLayouts.
360 :     include "conf/database.conf";
361 :    
362 :     # Select the default database layout. This can be overridden in the course.conf
363 :     # file of a particular course. If you choose "gdbm", WeBWorK will be able to
364 :     # use courses from WeBWorK 1 without first adding course.conf files to them.
365 : sh002i 2690 # However, the recommended database layout for new courses is "sql_single". This
366 :     # can be set when creating a course.
367 :     $dbLayoutName = "sql_single"; # or "gdbm" or "sql"
368 : sh002i 2508
369 :     # This sets the symbol "dbLayout" as an alias for the selected database layout.
370 :     *dbLayout = $dbLayouts{$dbLayoutName};
371 :    
372 :     ################################################################################
373 :     # Problem library options
374 :     ################################################################################
375 :    
376 :     # The directory containing the problem library files. Set to "" if no problem
377 :     # library is installed.
378 :     $problemLibrary{root} = "";
379 :    
380 : jj 3407 # Problem Library version
381 :     # Version 1 is in use. Version 2 will be released soon.
382 :     $problemLibrary{version} = "1";
383 :    
384 : sh002i 2508 # The name of the SQL database containing problem metadata
385 :     $problemLibrary{sourceSQL} = "ProblemLibrary";
386 :    
387 :     # The user name to use when connecting to the problem library database
388 :     $problemLibrary{userSQL} = "webworkRead";
389 :    
390 :     # The password to use when connecting to the problem library database
391 :     $problemLibrary{passwordSQL} = "";
392 :    
393 :     ################################################################################
394 : sh002i 2438 # Logs
395 :     ################################################################################
396 : dpvc 2431
397 : sh002i 2438 # FIXME: take logs out of %webworkFiles/%courseFiles and give them their own
398 :     # top-level hash.
399 : sh002i 705
400 : sh002i 2438 # Logs data about how long it takes to process problems. (Do not confuse this
401 :     # with the /other/ timing log which can be set by WeBWorK::Timing and is used
402 :     # for benchmarking system performance in general. At some point, this timing
403 :     # mechanism will be deprecated in favor of the WeBWorK::Timing mechanism.)
404 :     $webworkFiles{logs}{timing} = "$webworkDirs{logs}/timing.log";
405 : sh002i 654
406 : sh002i 2831 # Logs courses created via the web-based Course Administration module.
407 :     $webworkFiles{logs}{hosted_courses} = "$webworkDirs{logs}/hosted_courses.log";
408 :    
409 : sh002i 2438 # The transaction log contains data from each recorded answer submission. This
410 :     # is useful if the database becomes corrupted.
411 :     $webworkFiles{logs}{transaction} = "$courseDirs{logs}/transaction.log";
412 :    
413 :     # The answer log stores a history of all users' submitted answers.
414 :     $courseFiles{logs}{answer_log} = "$courseDirs{logs}/answer_log";
415 :    
416 : sh002i 3365 # Log logins.
417 :     $courseFiles{logs}{login_log} = "$courseDirs{logs}/login.log";
418 :    
419 : jj 3583 # Log for almost every click. By default it is the empty string, which
420 :     # turns this log off. If you want it turned on, we suggest
421 :     # "$courseDirs{logs}/activity.log"
422 :     # When turned on, this log can get quite large.
423 :     $courseFiles{logs}{activity_log} = '';
424 :    
425 : sh002i 654 ################################################################################
426 : sh002i 2438 # Site defaults (FIXME: what other things could be "site defaults"?)
427 :     ################################################################################
428 :    
429 :     # Status strings -- lists valid status values and their names. If your site uses
430 :     # additional values, add them here.
431 :     $siteDefaults{status} = {
432 :     A => "Audit",
433 : sh002i 2883 a => "Audit",
434 : sh002i 2438 audit => "Audit",
435 :     D => "Drop",
436 : sh002i 2883 d => "Drop",
437 : sh002i 2438 drop => "Drop",
438 :     withdraw => "Drop",
439 :     C => "Enrolled",
440 : sh002i 2883 c => "Enrolled",
441 : sh002i 2438 current => "Enrolled",
442 :     enrolled => "Enrolled",
443 :     };
444 :    
445 : sh002i 2857 # Set the default timezone of courses on this server. To get a list of valid
446 :     # timezones, run:
447 : sh002i 2770 #
448 : sh002i 2857 # perl -MDateTime::TimeZone -e 'print join "\n", DateTime::TimeZone::all_names'
449 :     #
450 :     # To get a list of valid timezone "links" (deprecated names), run:
451 :     #
452 :     # perl -MDateTime::TimeZone -e 'print join "\n", DateTime::TimeZone::links'
453 :     #
454 : sh002i 2770 # If left blank, the system timezone will be used. This is usually what you
455 :     # want. You might want to set this if your server is NOT in the same timezone as
456 :     # your school. If just a few courses are in a different timezone, set this in
457 :     # course.conf for the affected courses instead.
458 :     #
459 :     $siteDefaults{timezone} = "";
460 :    
461 : gage 3436 # The default_templates_course is used by default to create a new course.
462 :     # The contents of the templates directory are copied from this course
463 :     # to the new course being created.
464 :     $siteDefaults{default_templates_course} ="modelCourse";
465 :    
466 : sh002i 2438 ################################################################################
467 : sh002i 663 # Frontend options
468 :     ################################################################################
469 :    
470 : sh002i 654 %templates = (
471 : sh002i 1100 system => "$webworkDirs{conf}/templates/ur.template",
472 : glarose 3378 gateway => "$webworkDirs{conf}/templates/gw.template",
473 : sh002i 654 );
474 :    
475 : sh002i 663 ################################################################################
476 : sh002i 1108 # Authorization system
477 :     ################################################################################
478 :    
479 :     # This lets you specify a minimum permission level needed to perform certain
480 : sh002i 3009 # actions. For each pair in the hash below, in order to perform the action
481 :     # described by the key, the user must have a permission level greater than or
482 :     # equal to the value.
483 : sh002i 2438
484 : sh002i 3009 my $guest = -1;
485 : sh002i 2439 my $student = 0;
486 : glarose 3377 my $proctor = 2;
487 : sh002i 2439 my $ta = 5;
488 : gage 1021 my $professor = 10;
489 : sh002i 2505 my $nobody = undef;
490 : sh002i 2438
491 : sh002i 654 %permissionLevels = (
492 : sh002i 3009 login => $guest,
493 : sh002i 2381 report_bugs => $student,
494 : sh002i 2849 submit_feedback => $student,
495 :     change_password => $student,
496 :     change_email_address => $student,
497 : glarose 3377
498 :     proctor_quiz => $proctor,
499 : sh002i 2505
500 : toenail 2376 view_multiple_sets => $ta,
501 :     view_unopened_sets => $ta,
502 :     view_unpublished_sets => $ta,
503 :     view_answers => $ta,
504 : sh002i 2505
505 : sh002i 1108 become_student => $professor,
506 :     access_instructor_tools => $ta,
507 : sh002i 2505 score_sets => $professor,
508 :     send_mail => $professor,
509 : sh002i 2724 receive_feedback => $ta,
510 : sh002i 2505
511 : sh002i 1108 create_and_delete_problem_sets => $professor,
512 : sh002i 2505 assign_problem_sets => $professor,
513 : sh002i 1108 modify_problem_sets => $professor,
514 : malsyned 1210 modify_student_data => $professor,
515 : sh002i 1617 modify_classlist_files => $professor,
516 :     modify_set_def_files => $professor,
517 : sh002i 2000 modify_scoring_files => $professor,
518 : gage 2468 modify_problem_template_files => $professor,
519 : sh002i 2505
520 : gage 2027 create_and_delete_courses => $professor,
521 : sh002i 2309 fix_course_databases => $professor,
522 : sh002i 2505
523 :     ##### Behavior of the interactive problem processor #####
524 :    
525 :     show_correct_answers_before_answer_date => $ta,
526 :     show_solutions_before_answer_date => $ta,
527 :     avoid_recording_answers => $ta,
528 : jj 3580 # Below this level, old answers are never initially shown
529 : jj 3564 can_show_old_answers_by_default => $student,
530 : jj 3580 # at this level, we look at showOldAnswers for default value
531 :     # even after the due date
532 :     can_always_use_show_old_answers_default => $professor,
533 : sh002i 2505 check_answers_before_open_date => $ta,
534 :     check_answers_after_open_date_with_attempts => $ta,
535 : sh002i 3009 check_answers_after_open_date_without_attempts => $guest,
536 :     check_answers_after_due_date => $guest,
537 :     check_answers_after_answer_date => $guest,
538 : sh002i 2505 record_answers_when_acting_as_student => $nobody,
539 :     # "record_answers_when_acting_as_student" takes precedence
540 :     # over the following for professors acting as students:
541 :     record_answers_before_open_date => $nobody,
542 :     record_answers_after_open_date_with_attempts => $student,
543 :     record_answers_after_open_date_without_attempts => $nobody,
544 :     record_answers_after_due_date => $nobody,
545 :     record_answers_after_answer_date => $nobody,
546 : sh002i 2764 dont_log_past_answers => $professor,
547 :    
548 :     ##### Behavior of the Hardcopy Processor #####
549 :    
550 :     download_hardcopy_multiuser => $ta,
551 :     download_hardcopy_multiset => $ta,
552 :     download_hardcopy_format_tex => $ta,
553 : sh002i 654 );
554 :    
555 : sh002i 1108 ################################################################################
556 :     # Session options
557 :     ################################################################################
558 :    
559 : sh002i 768 # $sessionKeyTimeout defines seconds of inactivity before a key expires
560 :     $sessionKeyTimeout = 60*30;
561 :    
562 : sh002i 811 # $sessionKeyLength defines the length (in characters) of the session key
563 :     $sessionKeyLength = 40;
564 :    
565 :     # @sessionKeyChars lists the legal session key characters
566 :     @sessionKeyChars = ('A'..'Z', 'a'..'z', '0'..'9', '.', '^', '/', '!', '*');
567 :    
568 : sh002i 768 # Practice users are users who's names start with $practiceUser
569 :     # (you can comment this out to remove practice user support)
570 :     $practiceUserPrefix = "practice";
571 :    
572 :     # There is a practice user who can be logged in multiple times. He's
573 :     # commented out by default, though, so you don't hurt yourself. It is
574 :     # kindof a backdoor to the practice user system, since he doesn't have a
575 :     # password. Come to think of it, why do we even have this?!
576 :     #$debugPracticeUser = "practice666";
577 :    
578 : sh002i 663 ################################################################################
579 : sh002i 2438 # PG subsystem options
580 : sh002i 663 ################################################################################
581 : sh002i 654
582 : sh002i 2438 # List of enabled display modes. Comment out any modes you don't wish to make
583 :     # available for use.
584 :     $pg{displayModes} = [
585 :     "plainText", # display raw TeX for math expressions
586 :     "formattedText", # format math expressions using TtH
587 :     "images", # display math expressions as images generated by dvipng
588 :     "jsMath", # render TeX math expressions on the client side using jsMath
589 :     "asciimath", # render TeX math expressions on the client side using ASCIIMathML
590 :     ];
591 :    
592 :     #### Default settings for the PG translator
593 :    
594 :     # Default display mode. Should be listed above.
595 :     $pg{options}{displayMode} = "images";
596 :    
597 :     # The default grader to use, if a problem doesn't specify.
598 :     $pg{options}{grader} = "avg_problem_grader";
599 :    
600 :     # Fill in answer blanks with the student's last answer by default?
601 :     $pg{options}{showOldAnswers} = 1;
602 :    
603 :     # Show correct answers (when allowed) by default?
604 :     $pg{options}{showCorrectAnswers} = 0;
605 :    
606 :     # Show hints (when allowed) by default?
607 :     $pg{options}{showHints} = 0;
608 :    
609 :     # Show solutions (when allowed) by default?
610 :     $pg{options}{showSolutions} = 0;
611 :    
612 :     # Catch translation warnings internally by default? (We no longer need to do
613 :     # this, since there is a global warnings handler. So this should be off.)
614 :     $pg{options}{catchWarnings} = 0;
615 :    
616 :     ##### Currently-selected renderer
617 :    
618 :     # Only the local renderer is supported in this version.
619 :     $pg{renderer} = "WeBWorK::PG::Local";
620 :    
621 :     # The remote renderer connects to an XML-RPC PG rendering server.
622 : sh002i 2940 #$pg{renderer} = "WeBWorK::PG::Remote";
623 : sh002i 2438
624 :     ##### Renderer-dependent options
625 :    
626 :     # The remote renderer has one option:
627 :     $pg{renderers}{"WeBWorK::PG::Remote"} = {
628 :     # The "proxy" server to connect to for remote rendering.
629 :     proxy => "http://localhost:21000/RenderD",
630 :     };
631 :    
632 :     ##### Settings for various display modes
633 :    
634 :     # "images" mode has several settings:
635 :     $pg{displayModeOptions}{images} = {
636 :     # Determines the method used to align images in output. Can be
637 :     # "baseline", "absmiddle", or "mysql".
638 :     dvipng_align => 'baseline',
639 :    
640 :     # If we choose mysql, we need information on connecting to the
641 :     # database. Whatever you use here, you have to create the database
642 :     # and grant read/write priveleges to the user listed here. To create
643 :     # the database in mysql, as root use:
644 :     #
645 :     # CREATE DATABASE DvipngDepths;
646 :     # USE DvipngDepths;
647 :     # CREATE TABLE depths (md5 CHAR(33) NOT NULL, depth SMALLINT, PRIMARY KEY (md5));
648 :     # GRANT ALL ON DvipngDepths.* TO webworkWrite;
649 :     #
650 :     # In the last statement, "webworkWrite" should match the user below.
651 : sh002i 2831 # FIXME: this database can become a table in the 'webwork' database
652 : sh002i 2438 dvipng_depth_db => {
653 :     dbsource => 'dbi:mysql:DvipngDepths',
654 :     user => $dbLayouts{sql}->{password}->{params}->{usernameRW},
655 :     passwd => $dbLayouts{sql}->{password}->{params}->{passwordRW},
656 : sh002i 2192 },
657 : sh002i 2438 };
658 : jj 2413
659 : dpvc 2983 $pg{displayModeOptions}{jsMath} = {
660 : dpvc 3538 reportMissingFonts => 0, # set to 1 to allow the missing font message
661 :     missingFontMessage => undef, # set to an HTML string to replace the missing font message
662 :     noImageFonts => 0, # set to 1 if you didn't install the jsMath image fonts
663 : dpvc 2983 };
664 :    
665 : sh002i 2438 ##### Directories used by PG
666 : jj 2413
667 : sh002i 2438 # The root of the PG directory tree (from pg_root in Apache config).
668 : sh002i 2491 $pg{directories}{root} = "$pg_dir";
669 : sh002i 2438 $pg{directories}{lib} = "$pg{directories}{root}/lib";
670 :     $pg{directories}{macros} = "$pg{directories}{root}/macros";
671 : jj 2417
672 : dpvc 3224 #
673 :     # The macro file search path. Each directory in this list is seached
674 :     # (in this order) by loadMacros() when it looks for a .pl file.
675 :     #
676 :     $pg{directories}{macrosPath} = [
677 :     ".", # search the problem file's directory
678 :     $courseDirs{macros},
679 :     $pg{directories}{macros},
680 :     ];
681 :    
682 : sh002i 2438 ##### "Special" PG environment variables. (Stuff that doesn't fit in anywhere else.)
683 : jj 2417
684 : sh002i 2438 # Users for whom to print the file name of the PG file being processed.
685 :     $pg{specialPGEnvironmentVars}{PRINT_FILE_NAMES_FOR} = [ "professor", ];
686 : jj 2417
687 : sh002i 2438 # Locations of CAPA resources. (Only necessary if you need to use converted CAPA
688 :     # problems.)
689 :     $pg{specialPGEnvironmentVars}{CAPA_Tools} = "$courseDirs{macros}/CAPA_Tools/",
690 :     $pg{specialPGEnvironmentVars}{CAPA_MCTools} = "$courseDirs{macros}/CAPA_MCTools/",
691 :     $pg{specialPGEnvironmentVars}{CAPA_GraphicsDirectory} = "$courseDirs{html}/CAPA_Graphics/",
692 :     $pg{specialPGEnvironmentVars}{CAPA_Graphics_URL} = "$courseURLs{html}/CAPA_Graphics/",
693 :    
694 :     # Size in pixels of dynamically-generated images, i.e. graphs.
695 :     $pg{specialPGEnvironmentVars}{onTheFlyImageSize} = 400,
696 : jj 3571
697 :     # To activate Parser-based versions of num_cmp and fun_cmp, change this
698 :     # value to 0.
699 :     $pg{specialPGEnvironmentVars}{useOldAnswerMacros} = 1;
700 : sh002i 2438
701 : jj 3552 # Strings to insert at the start and end of the body of a problem
702 :     # (at beginproblem() and ENDDOCUMENT) in various modes. More display modes
703 :     # can be added if different behaviours are desired (e.g., HTML_dpng,
704 :     # HTML_asciimath, etc.). These parts are not used in the Library browser.
705 :    
706 :     $pg{specialPGEnvironmentVars}{problemPreamble} = { TeX => '', HTML=> '' };
707 :     $pg{specialPGEnvironmentVars}{problemPostamble} = { TeX => '', HTML=>'' };
708 :    
709 :     # To have the problem body indented and boxed, uncomment:
710 :    
711 :     # $pg{specialPGEnvironmentVars}{problemPreamble}{HTML} = '<BLOCKQUOTE>
712 :     # <TABLE BORDER=1 CELLSPACING=1 CELLPADDING=15 BGCOLOR=#E8E8E8><TR><TD>';
713 :     # $pg{specialPGEnvironmentVars}{problemPostamble}{HTML} = '</TD></TR></TABLE>
714 :     # </BLOCKQUOTE>';
715 :    
716 : sh002i 2438 ##### PG modules to load
717 :    
718 :     # The first item of each list is the module to load. The remaining items are
719 :     # additional packages to import.
720 :    
721 :     ${pg}{modules} = [
722 :     [qw(DynaLoader)],
723 :     [qw(Exporter)],
724 :     [qw(GD)],
725 :    
726 : gage 3211 [qw(AlgParser AlgParserWithImplicitExpand Expr ExprWithImplicitExpand utf8)],
727 : sh002i 2438 [qw(AnswerHash AnswerEvaluator)],
728 :     [qw(WWPlot)], # required by Circle (and others)
729 :     [qw(Circle)],
730 :     [qw(Complex)],
731 :     [qw(Complex1)],
732 :     [qw(Distributions)],
733 :     [qw(Fraction)],
734 :     [qw(Fun)],
735 :     [qw(Hermite)],
736 :     [qw(Label)],
737 :     [qw(List)],
738 :     [qw(Match)],
739 :     [qw(MatrixReal1)], # required by Matrix
740 :     [qw(Matrix)],
741 :     [qw(Multiple)],
742 :     [qw(PGrandom)],
743 :     [qw(Regression)],
744 :     [qw(Select)],
745 :     [qw(Units)],
746 :     [qw(VectorField)],
747 : dpvc 2577 [qw(Parser Value)],
748 : jj 3571 [qw(Parser::Legacy)],
749 : sh002i 2954 [qw(Apache::Log)],
750 : sh002i 2438 ];
751 :    
752 :     ##### Answer evaluatior defaults
753 :    
754 :     $pg{ansEvalDefaults} = {
755 :     functAbsTolDefault => .001,
756 :     functLLimitDefault => .0000001,
757 :     functMaxConstantOfIntegration => 1E8,
758 :     functNumOfPoints => 3,
759 :     functRelPercentTolDefault => .1,
760 :     functULimitDefault => .9999999,
761 :     functVarDefault => "x",
762 :     functZeroLevelDefault => 1E-14,
763 :     functZeroLevelTolDefault => 1E-12,
764 :     numAbsTolDefault => .001,
765 :     numFormatDefault => "",
766 :     numRelPercentTolDefault => .1,
767 :     numZeroLevelDefault => 1E-14,
768 :     numZeroLevelTolDefault => 1E-12,
769 :     useBaseTenLog => 0,
770 :     defaultDisplayMatrixStyle => "[s]",
771 :     };
772 : sh002i 2491
773 :     ################################################################################
774 :     # Compatibility
775 :     ################################################################################
776 :    
777 :     # Define the old names for the various "root" variables.
778 :     $webworkRoot = $webworkDirs{root};
779 :     $webworkURLRoot = $webworkURLs{root};
780 :     $pgRoot = $pg{directories}{root};

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9