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

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

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

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

Legend:
Removed from v.1793  
changed lines
  Added in v.3831

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9