[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 5397 - (view) (download)

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

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9