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

Diff of /branches/rel-2-4-dev/webwork-modperl/conf/global.conf.dist

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

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

Legend:
Removed from v.2200  
changed lines
  Added in v.3967

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9