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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4195 - (view) (download)
Original Path: trunk/webwork-modperl/conf/global.conf.dist

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

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9