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

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

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

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

Legend:
Removed from v.1380  
changed lines
  Added in v.3377

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9