[system] / trunk / webwork2 / conf / global.conf.dist Repository:
ViewVC logotype

Annotation of /trunk/webwork2/conf/global.conf.dist

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4460 - (view) (download)

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

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9