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

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

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

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

Legend:
Removed from v.2146  
changed lines
  Added in v.4754

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9