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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

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

Legend:
Removed from v.1132  
changed lines
  Added in v.3552

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9