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

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

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

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

Legend:
Removed from v.2410  
changed lines
  Added in v.4386

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9