[system] / trunk / webwork-modperl / conf / global.conf.dist Repository:
ViewVC logotype

Annotation of /trunk/webwork-modperl/conf/global.conf.dist

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3701 - (view) (download)

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

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9