[system] / trunk / webwork-modperl / conf / global.conf.dist Repository:
ViewVC logotype

Diff of /trunk/webwork-modperl/conf/global.conf.dist

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

Revision 2438 Revision 3691
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.81 2004/07/01 20:31:13 dpvc Exp $ 5# $CVSHeader: webwork2/conf/global.conf.dist,v 1.146 2005/10/05 18:16:48 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 25
26# $pgRoot directory that contains the PG distribution 26################################################################################
27# $courseName name of the course being used 27# Seed variables
28################################################################################
29
30# Set these variables to correspond to your configuration and preferences. You
31# will need to restart the webserver to reset the variables in this section.
32
33# URL of WeBWorK handler.
34$webwork_url = "/webwork2";
35
36# Root directory of PG.
37$pg_dir = "/opt/pg";
38
39# URL and path to htdocs directory.
40$webwork_htdocs_url = "/webwork2_files";
41$webwork_htdocs_dir = "$webwork_dir/htdocs";
42
43# URL and path to courses directory.
44$webwork_courses_url = "/webwork2_course_files";
45$webwork_courses_dir = "$webwork_dir/courses";
46
47################################################################################
48# Paths to external programs
49################################################################################
50
51# system utilties
52$externalPrograms{mkdir} = "/bin/mkdir";
53$externalPrograms{mv} = "/bin/mv";
54$externalPrograms{mysql} = "/usr/bin/mysql";
55$externalPrograms{tar} = "/usr/bin/tar";
56
57# equation rendering/hardcopy utiltiies
58$externalPrograms{latex} = "/usr/bin/latex";
59$externalPrograms{pdflatex} = "/usr/bin/pdflatex --shell-escape"; # --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
97# AllowedRecipients defines addresses that the PG system is allowed to send mail
98# to. this prevents subtle PG exploits. This should be set in course.conf to the
99# addresses of professors of each course. Sending mail from the PG system (i.e.
100# questionaires, essay questions) will fail if this is not set somewhere (either
101# here or in course.conf).
102$mail{allowedRecipients} = [
103 #'prof1@yourserver.yourdomain.edu',
104 #'prof2@yourserver.yourdomain.edu',
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$mail{feedbackRecipients} = [
122 #'prof1@yourserver.yourdomain.edu',
123 #'prof2@yourserver.yourdomain.edu',
124];
125
126# Feedback subject line -- the following escape sequences are recognized:
127#
128# %c = course ID
129# %u = user ID
130# %s = set ID
131# %p = problem ID
132# %x = section
133# %r = recitation
134# %% = literal percent sign
135#
136$mail{feedbackSubjectFormat} = "[WWfeedback] course:%c user:%u set:%s prob:%p sec:%x rec:%r";
137
138# feedbackVerbosity:
139# 0: send only the feedback comment and context link
140# 1: as in 0, plus user, set, problem, and PG data
141# 2: as in 1, plus the problem environment (debugging data)
142$mail{feedbackVerbosity} = 1;
143
144# Defines the size of the Mail Merge editor window
145# FIXME: should this be here? it's UI, not mail
146# FIXME: replace this with the auto-size method that TWiki uses
147$mail{editor_window_rows} = 15;
148$mail{editor_window_columns} = 100;
28 149
29################################################################################ 150################################################################################
30# System-wide locations (directories and URLs) 151# System-wide locations (directories and URLs)
31################################################################################ 152################################################################################
32 153
33# The root directory, set by webwork_root variable in Apache configuration. 154# The root directory, set by webwork_root variable in Apache configuration.
34$webworkDirs{root} = "$webworkRoot"; 155$webworkDirs{root} = "$webwork_dir";
35 156
36# Location of system-wide data files. 157# Location of system-wide data files.
37$webworkDirs{DATA} = "$webworkDirs{root}/DATA"; 158$webworkDirs{DATA} = "$webworkDirs{root}/DATA";
38 159
39# Used for temporary storage of uploaded files. 160# Used for temporary storage of uploaded files.
44 165
45# Location of configuration files, templates, snippets, etc. 166# Location of configuration files, templates, snippets, etc.
46$webworkDirs{conf} = "$webworkDirs{root}/conf"; 167$webworkDirs{conf} = "$webworkDirs{root}/conf";
47 168
48# Location of course directories. 169# Location of course directories.
49$webworkDirs{courses} = "$webworkDirs{root}/courses"; 170$webworkDirs{courses} = "$webwork_courses_dir" || "$webworkDirs{root}/courses";
50
51# Contains the WeBWorK libraries. (FIXME: not used)
52#$webworkDirs{lib} = "$webworkDirs{root}/lib";
53 171
54# Contains log files. 172# Contains log files.
55$webworkDirs{logs} = "$webworkDirs{root}/logs"; 173$webworkDirs{logs} = "$webworkDirs{root}/logs";
56 174
57# Location of PG macros. (FIXME: not used)
58#$webworkDirs{macros} = "$pgRoot/macros";
59
60# Contains non-web-accessible temporary files, such as TeX working directories. 175# Contains non-web-accessible temporary files, such as TeX working directories.
61$webworkDirs{tmp} = "$webworkDirs{root}/tmp"; 176$webworkDirs{tmp} = "$webworkDirs{root}/tmp";
62 177
178# The (absolute) destinations of symbolic links that are OK for the FileManager to follow.
179# (any subdirectory of these is a valid target for a symbolic link.)
180# For example:
181# $webworkDirs{valid_symlinks} = ["$webworkDirs{courses}/modelCourse/templates","/ww2/common/sets"];
182$webworkDirs{valid_symlinks} = [];
183
63##### The following locations are web-accessible. 184##### The following locations are web-accessible.
64 185
65# The root URL (usually /webwork2), set by <Location> in Apache configuration. 186# The root URL (usually /webwork2), set by <Location> in Apache configuration.
66$webworkURLs{root} = "$webworkURLRoot"; 187$webworkURLs{root} = "$webwork_url";
67 188
68# Location of system-wide web-accessible files, such as equation images, and 189# Location of system-wide web-accessible files, such as equation images, and
69# help files. 190# help files.
70$webworkDirs{htdocs} = "$webworkDirs{root}/htdocs"; 191$webworkDirs{htdocs} = "$webwork_htdocs_dir" || "$webworkDirs{root}/htdocs";
71$webworkURLs{htdocs} = "/webwork2_files"; 192$webworkURLs{htdocs} = "$webwork_htdocs_url";
72
73# The URL of the static WeBWorK home page (FIXME: not used)
74#$webworkURLs{home} = "$webworkURLs{htdocs}/index.html";
75 193
76# Location of web-accessible temporary files, such as equation images. 194# Location of web-accessible temporary files, such as equation images.
77$webworkDirs{htdocs_temp} = "$webworkDirs{htdocs}/tmp"; 195$webworkDirs{htdocs_temp} = "$webworkDirs{htdocs}/tmp";
78$webworkURLs{htdocs_temp} = "$webworkURLs{htdocs}/tmp"; 196$webworkURLs{htdocs_temp} = "$webworkURLs{htdocs}/tmp";
79 197
92# Note that both systems must share a single "courses" directory for this to be 210# Note that both systems must share a single "courses" directory for this to be
93# useful. Leave this blank to disable 211# useful. Leave this blank to disable
94$webworkURLs{oldProf} = "/webwork1/profLogin.pl"; 212$webworkURLs{oldProf} = "/webwork1/profLogin.pl";
95 213
96# URL of WeBWorK Bugzilla database. 214# URL of WeBWorK Bugzilla database.
97$webworkURLs{bugReporter} = "http://bugs.webwork.rochester.edu/enter_bug.cgi?product=WeBWorK%20mod_perl"; 215$webworkURLs{bugReporter} = "http://bugs.webwork.rochester.edu/";
216
217# Location of CSS
218$webworkURLs{stylesheet} = "$webworkURLs{htdocs}/css/ur.css";
98 219
99# Location of jsMath script, used for the jsMath display mode. 220# Location of jsMath script, used for the jsMath display mode.
100$webworkURLs{jsMath} = "$webworkURLs{root}/jsMath/jsMath.js"; 221$webworkURLs{jsMath} = "$webworkURLs{htdocs}/jsMath/jsMath-ww.js";
101 222
102# Location of ASCIIMathML script, used for the asciimath display mode. 223# Location of ASCIIMathML script, used for the asciimath display mode.
103$webworkURLs{asciimath} = "$webworkURLs{root}/ASCIIMathML/ASCIIMathML.js"; 224$webworkURLs{asciimath} = "$webworkURLs{htdocs}/ASCIIMathML/ASCIIMathML.js";
104 225
105################################################################################ 226################################################################################
106# Defaults for course-specific locations (directories and URLs) 227# Defaults for course-specific locations (directories and URLs)
107################################################################################ 228################################################################################
108 229
116# Location of authentication data files when using a WW1 (GDBM) database. 237# Location of authentication data files when using a WW1 (GDBM) database.
117$courseDirs{auth_DATA} = "$courseDirs{DATA}/.auth"; 238$courseDirs{auth_DATA} = "$courseDirs{DATA}/.auth";
118 239
119# Location of course HTML files, passed to PG. 240# Location of course HTML files, passed to PG.
120$courseDirs{html} = "$courseDirs{root}/html"; 241$courseDirs{html} = "$courseDirs{root}/html";
121$courseURLs{html} = "/webwork2_course_files/$courseName"; 242$courseURLs{html} = "$webwork_courses_url/$courseName";
122#$courseURLs{root} = $courseURLs{html}; # FIXME: not used
123 243
124# Location of course image files, passed to PG. 244# Location of course image files, passed to PG.
125$courseDirs{html_images} = "$courseDirs{html}/images"; 245$courseDirs{html_images} = "$courseDirs{html}/images";
126 246
127# Location of web-accessible, course-specific temporary files, like static and 247# Location of web-accessible, course-specific temporary files, like static and
163 283
164# The preamble is the first thing in the TeX file. 284# The preamble is the first thing in the TeX file.
165$webworkFiles{hardcopySnippets}{preamble} = "$webworkDirs{conf}/snippets/hardcopyPreamble.tex"; 285$webworkFiles{hardcopySnippets}{preamble} = "$webworkDirs{conf}/snippets/hardcopyPreamble.tex";
166 286
167# The setHeader preceeds each set. It is a PG file. 287# The setHeader preceeds each set. It is a PG file.
168$webworkFiles{hardcopySnippets}{setHeader} = "$webworkDirs{conf}/snippets/setHeader.pg"; 288$webworkFiles{hardcopySnippets}{setHeader} = "$webworkDirs{conf}/snippets/setHeader.pg"; # hardcopySetHeader.pg",
169 289
170# The problem divider goes between problems. 290# The problem divider goes between problems.
171$webworkFiles{hardcopySnippets}{problemDivider} = "$webworkDirs{conf}/snippets/hardcopyProblemDivider.tex"; 291$webworkFiles{hardcopySnippets}{problemDivider} = "$webworkDirs{conf}/snippets/hardcopyProblemDivider.tex";
172 292
173# The set footer goes after each set. Is is a PG file. 293# The set footer goes after each set. Is is a PG file.
183$webworkFiles{hardcopySnippets}{postamble} = "$webworkDirs{conf}/snippets/hardcopyPostamble.tex"; 303$webworkFiles{hardcopySnippets}{postamble} = "$webworkDirs{conf}/snippets/hardcopyPostamble.tex";
184 304
185##### Screen snippets are used when displaying problem sets on the screen. 305##### Screen snippets are used when displaying problem sets on the screen.
186 306
187# The set header is displayed on the problem set page. It is a PG file. 307# The set header is displayed on the problem set page. It is a PG file.
188$webworkFiles{screenSnippets}{setHeader} = "$webworkDirs{conf}/snippets/setHeader.pg"; 308$webworkFiles{screenSnippets}{setHeader} = "$webworkDirs{conf}/snippets/setHeader.pg"; # screenSetHeader.pg"
189 309
310# A PG template for creation of new problems.
311$webworkFiles{screenSnippets}{blankProblem} = "$webworkDirs{conf}/snippets/blankProblem.pg"; # screenSetHeader.pg"
312
313# A site info "message of the day" file
314$webworkFiles{site_info} = "$webworkDirs{htdocs}/site_info.txt";
190################################################################################ 315################################################################################
191# Course-specific files 316# Course-specific files
192################################################################################ 317################################################################################
193 318
194# The course configuration file. 319# The course configuration file.
195$courseFiles{environment} = "$courseDirs{root}/course.conf"; 320$courseFiles{environment} = "$courseDirs{root}/course.conf";
196 321
197# The message of the day, displayed after login. (FIXME: not used) 322# The course simple configuration file (holds web-based configuratoin).
198#$courseFiles{motd} = "$courseDirs{templates}/motd.txt"; 323$courseFiles{simpleConfig} = "$courseDirs{root}/simple.conf";
199 324
200# File contents are displayed after login, on the problem sets page. Path given 325# File contents are displayed after login, on the problem sets page. Path given
201# here is relative to the templates directory. 326# here is relative to the templates directory.
202$courseFiles{course_info} = "course_info.txt"; 327$courseFiles{course_info} = "course_info.txt";
203 328
214# example, 339# example,
215# 340#
216# $courseFiles{problibs} = {rochester => "Rochester", asu => "ASU"}; 341# $courseFiles{problibs} = {rochester => "Rochester", asu => "ASU"};
217# 342#
218# would add two buttons, one for the Rochester library and one for the ASU 343# would add two buttons, one for the Rochester library and one for the ASU
219# library, provided templates/rochester and templates/asu exists. 344# library, provided templates/rochester and templates/asu exists either as
345# subdirectories or links to other directories.
220# 346#
221$courseFiles{problibs} = {}; 347$courseFiles{problibs} = {
348# rochesterLibrary => "Rochester",
349# asuLibrary => "Arizona State",
350# dcdsLibrary => "Detroit CDS",
351# dartmouthLibrary => "Dartmouth",
352# indianaLibrary => "Indiana",
353# osuLibrary => "Ohio State",
354# capaLibrary => "CAPA",
355};
356
357################################################################################
358# Database options
359################################################################################
360
361# Several database are defined in the file conf/database.conf and stored in the
362# hash %dbLayouts.
363include "conf/database.conf";
364
365# Select the default database layout. This can be overridden in the course.conf
366# file of a particular course. If you choose "gdbm", WeBWorK will be able to
367# use courses from WeBWorK 1 without first adding course.conf files to them.
368# However, the recommended database layout for new courses is "sql_single". This
369# can be set when creating a course.
370$dbLayoutName = "sql_single"; # or "gdbm" or "sql"
371
372# This sets the symbol "dbLayout" as an alias for the selected database layout.
373*dbLayout = $dbLayouts{$dbLayoutName};
374
375################################################################################
376# Problem library options
377################################################################################
378
379# The directory containing the problem library files. Set to "" if no problem
380# library is installed.
381$problemLibrary{root} = "";
382
383# Problem Library version
384# Version 1 is in use. Version 2 will be released soon.
385$problemLibrary{version} = "1";
386
387# The name of the SQL database containing problem metadata
388$problemLibrary{sourceSQL} = "ProblemLibrary";
389
390# The user name to use when connecting to the problem library database
391$problemLibrary{userSQL} = "webworkRead";
392
393# The password to use when connecting to the problem library database
394$problemLibrary{passwordSQL} = "";
222 395
223################################################################################ 396################################################################################
224# Logs 397# Logs
225################################################################################ 398################################################################################
226 399
231# with the /other/ timing log which can be set by WeBWorK::Timing and is used 404# with the /other/ timing log which can be set by WeBWorK::Timing and is used
232# for benchmarking system performance in general. At some point, this timing 405# for benchmarking system performance in general. At some point, this timing
233# mechanism will be deprecated in favor of the WeBWorK::Timing mechanism.) 406# mechanism will be deprecated in favor of the WeBWorK::Timing mechanism.)
234$webworkFiles{logs}{timing} = "$webworkDirs{logs}/timing.log"; 407$webworkFiles{logs}{timing} = "$webworkDirs{logs}/timing.log";
235 408
409# Logs courses created via the web-based Course Administration module.
410$webworkFiles{logs}{hosted_courses} = "$webworkDirs{logs}/hosted_courses.log";
411
236# The transaction log contains data from each recorded answer submission. This 412# The transaction log contains data from each recorded answer submission. This
237# is useful if the database becomes corrupted. 413# is useful if the database becomes corrupted.
238$webworkFiles{logs}{transaction} = "$courseDirs{logs}/transaction.log"; 414$webworkFiles{logs}{transaction} = "$courseDirs{logs}/transaction.log";
239 415
240# The past answer list stores a history of all users' submitted answers. (FIXME: not used)
241$webworkFiles{logs}{pastAnswerList} = "$courseDirs{logs}/past_answers.log";
242
243# The answer log stores a history of all users' submitted answers. 416# The answer log stores a history of all users' submitted answers.
244$courseFiles{logs}{answer_log} = "$courseDirs{logs}/answer_log"; 417$courseFiles{logs}{answer_log} = "$courseDirs{logs}/answer_log";
245 418
246################################################################################ 419# Log logins.
247# Mail settings 420$courseFiles{logs}{login_log} = "$courseDirs{logs}/login.log";
248################################################################################
249 421
250# Mail sent by the PG system and the mail merge and feedback modules will be 422# Log for almost every click. By default it is the empty string, which
251# sent via this SMTP server. 423# turns this log off. If you want it turned on, we suggest
252$mail{smtpServer} = 'mail.yourschool.edu'; 424# "$courseDirs{logs}/activity.log"
253 425# When turned on, this log can get quite large.
254# When connecting to the above server, WeBWorK will send this address in the 426$courseFiles{logs}{activity_log} = '';
255# MAIL FROM command. This has nothing to do with the "From" address on the mail
256# message. It can really be anything, but some mail servers require it contain
257# a valid mail domain, or at least be well-formed.
258$mail{smtpSender} = 'webwork@yourserver.yourschool.edu';
259
260# AllowedRecipients defines addresses that the PG system is allowed to send mail
261# to. this prevents subtle PG exploits. This should be set in course.conf to the
262# addresses of professors of each course. Sending mail from the PG system (i.e.
263# questionaires, essay questions) will fail if this is not set somewhere (either
264# here or in course.conf).
265$mail{allowedRecipients} = [
266 #'prof1@yourserver.yourdomain.edu',
267 #'prof2@yourserver.yourdomain.edu',
268];
269
270# If defined, feedbackRecipients overrides the list of recipients for feedback
271# email. It's appropriate to set this in the course.conf for specific courses,
272# but probably not in global.conf. if not defined, mail is sent to all
273# professors and TAs for a given course
274$mail{feedbackRecipients} = [
275 #'prof1@yourserver.yourdomain.edu',
276 #'prof2@yourserver.yourdomain.edu',
277];
278
279# feedbackVerbosity:
280# 0: send only the feedback comment and context link
281# 1: as in 0, plus user, set, problem, and PG data
282# 2: as in 1, plus the problem environment (debugging data)
283$mail{feedbackVerbosity} = 1;
284
285# Defines the size of the Mail Merge editor window
286# FIXME: should this be here? it's UI, not mail
287# FIXME: replace this with the auto-size method that TWiki uses
288$mail{editor_window_rows} = 15;
289$mail{editor_window_columns} = 100;
290
291################################################################################
292# Paths to external programs
293################################################################################
294
295$externalPrograms{mkdir} = "/bin/mkdir";
296$externalPrograms{mysql} = "/usr/local/bin/mysql";
297
298$externalPrograms{latex} = "/usr/local/bin/latex";
299$externalPrograms{pdflatex} = "/usr/local/bin/pdflatex";
300$externalPrograms{dvipng} = "/usr/local/bin/dvipng";
301$externalPrograms{tth} = "/usr/local/bin/tth";
302
303# These image conversion utilities are included in the WeBWorK distribution.
304$externalPrograms{gif2eps} = "$webworkDirs{bin}/gif2eps";
305$externalPrograms{png2eps} = "$webworkDirs{bin}/png2eps";
306$externalPrograms{gif2png} = "$webworkDirs{bin}/gif2png";
307 427
308################################################################################ 428################################################################################
309# Site defaults (FIXME: what other things could be "site defaults"?) 429# Site defaults (FIXME: what other things could be "site defaults"?)
310################################################################################ 430################################################################################
311 431
312# Status strings -- lists valid status values and their names. If your site uses 432# Set the default timezone of courses on this server. To get a list of valid
313# additional values, add them here. 433# timezones, run:
314$siteDefaults{status} = { 434#
315 A => "Audit", 435# perl -MDateTime::TimeZone -e 'print join "\n", DateTime::TimeZone::all_names'
316 audit => "Audit", 436#
317 D => "Drop", 437# To get a list of valid timezone "links" (deprecated names), run:
318 drop => "Drop", 438#
319 withdraw => "Drop", 439# perl -MDateTime::TimeZone -e 'print join "\n", DateTime::TimeZone::links'
320 C => "Enrolled", 440#
321 current => "Enrolled", 441# If left blank, the system timezone will be used. This is usually what you
322 enrolled => "Enrolled", 442# want. You might want to set this if your server is NOT in the same timezone as
323}; 443# your school. If just a few courses are in a different timezone, set this in
444# course.conf for the affected courses instead.
445#
446$siteDefaults{timezone} = "";
447
448# The default_templates_course is used by default to create a new course.
449# The contents of the templates directory are copied from this course
450# to the new course being created.
451$siteDefaults{default_templates_course} ="modelCourse";
324 452
325################################################################################ 453################################################################################
326# Frontend options 454# Frontend options
327################################################################################ 455################################################################################
328 456
329%templates = ( 457%templates = (
330 system => "$webworkDirs{conf}/templates/ur.template", 458 system => "$webworkDirs{conf}/templates/ur.template",
459 gateway => "$webworkDirs{conf}/templates/gw.template",
331); 460);
332 461
333################################################################################ 462################################################################################
334# Database options
335################################################################################
336
337# Several database are defined in the file conf/database.conf and stored in the
338# hash %dbLayouts.
339include "conf/database.conf";
340
341# Select the default database layout. This can be overridden in the course.conf
342# file of a particular course. If you choose "gdbm", WeBWorK will be able to
343# use courses from WeBWorK 1 without first adding course.conf files to them.
344# However, the recommended database layout for new courses is "sql". This can
345# be set when creating a course.
346$dbLayoutName = "sql"; # or: "gdbm"
347
348# This sets the symbol "dbLayout" as an alias for the selected database layout.
349*dbLayout = $dbLayouts{$dbLayoutName};
350
351################################################################################
352# Problem library options
353################################################################################
354
355# The directory containing the problem library files. Set to "" if no problem
356# library is installed.
357$problemLibrary{root} = "";
358
359# The name of the SQL database containing problem metadata
360$problemLibrary{sourceSQL} = "ProblemLibrary";
361
362# The user name to use when connecting to the problem library database
363$problemLibrary{userSQL} = "webworkRead";
364
365# The password to use when connecting to the problem library database
366$problemLibrary{passwordSQL} = "";
367
368################################################################################
369# Authorization system 463# Authorization system
370################################################################################ 464################################################################################
371 465
372# This lets you specify a minimum permission level needed to perform certain 466# this section lets you define which groups of users can perform which actions.
373# actions. In the current system, >=10 will allow a professor to perform the
374# action, >=5 will allow a TA to, and >=0 will allow a student to perform an
375# action (almost never what you want).
376 467
377my $student = 0; 468# this hash maps a numeric permission level to the name of a role. the number
378my $ta = 5; 469# assigned to a role is significant -- roles with higher numbers are considered
470# "more privileged", and are included when that role is listed for a privilege
471# below.
472#
473%userRoles = (
474 guest => -5,
475 student => 0,
476 proctor => 2,
477 ta => 5,
379my $professor = 10; 478 professor => 10,
479);
380 480
481# this hash maps operations to the roles that are allowed to perform those
482# operations. the role listed and any role with a higher permission level (in
483# the %userRoles hash) will be allowed to perform the operation. If the role
484# is undefined, no users will be allowed to perform the operation.
485#
381%permissionLevels = ( 486%permissionLevels = (
487 login => "guest",
382 report_bugs => $student, 488 report_bugs => "student",
489 submit_feedback => "student",
490 change_password => "student",
491 change_email_address => "student",
492
493 proctor_quiz => "proctor",
494
383 view_multiple_sets => $ta, 495 view_multiple_sets => "ta",
384 view_unopened_sets => $ta, 496 view_unopened_sets => "ta",
385 view_unpublished_sets => $ta, 497 view_unpublished_sets => "ta",
386 view_answers => $ta, 498 view_answers => "ta",
499
387 become_student => $professor, 500 become_student => "professor",
388 access_instructor_tools => $ta, 501 access_instructor_tools => "ta",
389 create_and_delete_problem_sets => $professor,
390 modify_problem_sets => $professor,
391 assign_problem_sets => $professor,
392 modify_student_data => $professor,
393 score_sets => $professor, 502 score_sets => "professor",
394 send_mail => $professor, 503 send_mail => "professor",
504 receive_feedback => "ta",
505
506 create_and_delete_problem_sets => "professor",
507 assign_problem_sets => "professor",
508 modify_problem_sets => "professor",
509 modify_student_data => "professor",
395 modify_classlist_files => $professor, 510 modify_classlist_files => "professor",
396 modify_set_def_files => $professor, 511 modify_set_def_files => "professor",
397 modify_scoring_files => $professor, 512 modify_scoring_files => "professor",
513 modify_problem_template_files => "professor",
514 manage_course_files => "professor",
515
398 create_and_delete_courses => $professor, 516 create_and_delete_courses => "professor",
399 fix_course_databases => $professor, 517 fix_course_databases => "professor",
518
519 ##### Behavior of the interactive problem processor #####
520
521 show_correct_answers_before_answer_date => "ta",
522 show_solutions_before_answer_date => "ta",
523 avoid_recording_answers => "ta",
524 # Below this level, old answers are never initially shown
525 can_show_old_answers_by_default => "student",
526 # at this level, we look at showOldAnswers for default value
527 # even after the due date
528 can_always_use_show_old_answers_default => "professor",
529 check_answers_before_open_date => "ta",
530 check_answers_after_open_date_with_attempts => "ta",
531 check_answers_after_open_date_without_attempts => "guest",
532 check_answers_after_due_date => "guest",
533 check_answers_after_answer_date => "guest",
534 record_answers_when_acting_as_student => undef,
535 # "record_answers_when_acting_as_student" takes precedence
536 # over the following for professors acting as students:
537 record_answers_before_open_date => undef,
538 record_answers_after_open_date_with_attempts => "student",
539 record_answers_after_open_date_without_attempts => undef,
540 record_answers_after_due_date => undef,
541 record_answers_after_answer_date => undef,
542 dont_log_past_answers => "professor",
543
544 ##### Behavior of the Hardcopy Processor #####
545
546 download_hardcopy_multiuser => "ta",
547 download_hardcopy_multiset => "ta",
548 download_hardcopy_format_pdf => "guest",
549 download_hardcopy_format_tex => "ta",
550);
551
552################################################################################
553# Status system
554################################################################################
555
556# This is the default status given to new students and students with invalid
557# or missing statuses.
558$default_status = "Enrolled";
559
560# The first abbreviation in the abbreviations list is the canonical
561# abbreviation, and will be used when setting the status value in a user record
562# or an exported classlist file.
563#
564# Results are undefined if more than one status has the same abbreviation.
565#
566# The four behaviors that are controlled by status are:
567# allow_course_access => is this user allowed to log in?
568# include_in_assignment => is this user included when assigning as set to "all" users?
569# include_in_stats => is this user included in statistical reports?
570# include_in_email => is this user included in emails sent to the class?
571# include_in_scoring => is this user included in score reports?
572
573%statuses = (
574 Enrolled => {
575 abbrevs => [qw/ C c current enrolled /],
576 behaviors => [qw/ allow_course_access include_in_assignment include_in_stats
577 include_in_email include_in_scoring /],
578 },
579 Audit => {
580 abbrevs => [qw/ A a audit /],
581 behaviors => [qw/ allow_course_access include_in_assignment include_in_stats
582 include_in_email /],
583 },
584 Drop => {
585 abbrevs => [qw/ D d drop withdraw /],
586 behaviors => [qw/ /],
587 },
400); 588);
401 589
402################################################################################ 590################################################################################
403# Session options 591# Session options
404################################################################################ 592################################################################################
464 652
465# Only the local renderer is supported in this version. 653# Only the local renderer is supported in this version.
466$pg{renderer} = "WeBWorK::PG::Local"; 654$pg{renderer} = "WeBWorK::PG::Local";
467 655
468# The remote renderer connects to an XML-RPC PG rendering server. 656# The remote renderer connects to an XML-RPC PG rendering server.
469#$pg{renderer} = "WeBWorK::PG::Remote"' 657#$pg{renderer} = "WeBWorK::PG::Remote";
470 658
471##### Renderer-dependent options 659##### Renderer-dependent options
472 660
473# The remote renderer has one option: 661# The remote renderer has one option:
474$pg{renderers}{"WeBWorK::PG::Remote"} = { 662$pg{renderers}{"WeBWorK::PG::Remote"} = {
493 # USE DvipngDepths; 681 # USE DvipngDepths;
494 # CREATE TABLE depths (md5 CHAR(33) NOT NULL, depth SMALLINT, PRIMARY KEY (md5)); 682 # CREATE TABLE depths (md5 CHAR(33) NOT NULL, depth SMALLINT, PRIMARY KEY (md5));
495 # GRANT ALL ON DvipngDepths.* TO webworkWrite; 683 # GRANT ALL ON DvipngDepths.* TO webworkWrite;
496 # 684 #
497 # In the last statement, "webworkWrite" should match the user below. 685 # In the last statement, "webworkWrite" should match the user below.
686 # FIXME: this database can become a table in the 'webwork' database
498 dvipng_depth_db => { 687 dvipng_depth_db => {
499 dbsource => 'dbi:mysql:DvipngDepths', 688 dbsource => 'dbi:mysql:DvipngDepths',
500 user => $dbLayouts{sql}->{password}->{params}->{usernameRW}, 689 user => $dbLayouts{sql}->{password}->{params}->{usernameRW},
501 passwd => $dbLayouts{sql}->{password}->{params}->{passwordRW}, 690 passwd => $dbLayouts{sql}->{password}->{params}->{passwordRW},
502 }, 691 },
503}; 692};
504 693
694$pg{displayModeOptions}{jsMath} = {
695 reportMissingFonts => 0, # set to 1 to allow the missing font message
696 missingFontMessage => undef, # set to an HTML string to replace the missing font message
697 noImageFonts => 0, # set to 1 if you didn't install the jsMath image fonts
698};
699
505##### Directories used by PG 700##### Directories used by PG
506 701
507# The root of the PG directory tree (from pg_root in Apache config). 702# The root of the PG directory tree (from pg_root in Apache config).
508$pg{directories}{root} = "$pgRoot"; 703$pg{directories}{root} = "$pg_dir";
509$pg{directories}{lib} = "$pg{directories}{root}/lib"; 704$pg{directories}{lib} = "$pg{directories}{root}/lib";
510$pg{directories}{macros} = "$pg{directories}{root}/macros"; 705$pg{directories}{macros} = "$pg{directories}{root}/macros";
706
707#
708# The macro file search path. Each directory in this list is seached
709# (in this order) by loadMacros() when it looks for a .pl file.
710#
711$pg{directories}{macrosPath} = [
712 ".", # search the problem file's directory
713 $courseDirs{macros},
714 $pg{directories}{macros},
715];
511 716
512##### "Special" PG environment variables. (Stuff that doesn't fit in anywhere else.) 717##### "Special" PG environment variables. (Stuff that doesn't fit in anywhere else.)
513 718
514# Users for whom to print the file name of the PG file being processed. 719# Users for whom to print the file name of the PG file being processed.
515$pg{specialPGEnvironmentVars}{PRINT_FILE_NAMES_FOR} = [ "professor", ]; 720$pg{specialPGEnvironmentVars}{PRINT_FILE_NAMES_FOR} = [ "professor", ];
521$pg{specialPGEnvironmentVars}{CAPA_GraphicsDirectory} = "$courseDirs{html}/CAPA_Graphics/", 726$pg{specialPGEnvironmentVars}{CAPA_GraphicsDirectory} = "$courseDirs{html}/CAPA_Graphics/",
522$pg{specialPGEnvironmentVars}{CAPA_Graphics_URL} = "$courseURLs{html}/CAPA_Graphics/", 727$pg{specialPGEnvironmentVars}{CAPA_Graphics_URL} = "$courseURLs{html}/CAPA_Graphics/",
523 728
524# Size in pixels of dynamically-generated images, i.e. graphs. 729# Size in pixels of dynamically-generated images, i.e. graphs.
525$pg{specialPGEnvironmentVars}{onTheFlyImageSize} = 400, 730$pg{specialPGEnvironmentVars}{onTheFlyImageSize} = 400,
731
732# To activate Parser-based versions of num_cmp and fun_cmp, change this
733# value to 0.
734$pg{specialPGEnvironmentVars}{useOldAnswerMacros} = 1;
735
736# Strings to insert at the start and end of the body of a problem
737# (at beginproblem() and ENDDOCUMENT) in various modes. More display modes
738# can be added if different behaviours are desired (e.g., HTML_dpng,
739# HTML_asciimath, etc.). These parts are not used in the Library browser.
740
741$pg{specialPGEnvironmentVars}{problemPreamble} = { TeX => '', HTML=> '' };
742$pg{specialPGEnvironmentVars}{problemPostamble} = { TeX => '', HTML=>'' };
743
744# To have the problem body indented and boxed, uncomment:
745
746# $pg{specialPGEnvironmentVars}{problemPreamble}{HTML} = '<BLOCKQUOTE>
747# <TABLE BORDER=1 CELLSPACING=1 CELLPADDING=15 BGCOLOR=#E8E8E8><TR><TD>';
748# $pg{specialPGEnvironmentVars}{problemPostamble}{HTML} = '</TD></TR></TABLE>
749# </BLOCKQUOTE>';
526 750
527##### PG modules to load 751##### PG modules to load
528 752
529# The first item of each list is the module to load. The remaining items are 753# The first item of each list is the module to load. The remaining items are
530# additional packages to import. 754# additional packages to import.
532${pg}{modules} = [ 756${pg}{modules} = [
533 [qw(DynaLoader)], 757 [qw(DynaLoader)],
534 [qw(Exporter)], 758 [qw(Exporter)],
535 [qw(GD)], 759 [qw(GD)],
536 760
537 [qw(AlgParser AlgParserWithImplicitExpand Expr ExprWithImplicitExpand)], 761 [qw(AlgParser AlgParserWithImplicitExpand Expr ExprWithImplicitExpand utf8)],
538 [qw(AnswerHash AnswerEvaluator)], 762 [qw(AnswerHash AnswerEvaluator)],
539 [qw(WWPlot)], # required by Circle (and others) 763 [qw(WWPlot)], # required by Circle (and others)
540 [qw(Circle)], 764 [qw(Circle)],
541 [qw(Complex)], 765 [qw(Complex)],
542 [qw(Complex1)], 766 [qw(Complex1)],
553 [qw(PGrandom)], 777 [qw(PGrandom)],
554 [qw(Regression)], 778 [qw(Regression)],
555 [qw(Select)], 779 [qw(Select)],
556 [qw(Units)], 780 [qw(Units)],
557 [qw(VectorField)], 781 [qw(VectorField)],
782 [qw(Parser Value)],
783 [qw(Parser::Legacy)],
784 [qw(Apache::Log)],
558]; 785];
559 786
560##### Answer evaluatior defaults 787##### Answer evaluatior defaults
561 788
562$pg{ansEvalDefaults} = { 789$pg{ansEvalDefaults} = {
575 numZeroLevelDefault => 1E-14, 802 numZeroLevelDefault => 1E-14,
576 numZeroLevelTolDefault => 1E-12, 803 numZeroLevelTolDefault => 1E-12,
577 useBaseTenLog => 0, 804 useBaseTenLog => 0,
578 defaultDisplayMatrixStyle => "[s]", 805 defaultDisplayMatrixStyle => "[s]",
579}; 806};
807
808################################################################################
809# Compatibility
810################################################################################
811
812# Define the old names for the various "root" variables.
813$webworkRoot = $webworkDirs{root};
814$webworkURLRoot = $webworkURLs{root};
815$pgRoot = $pg{directories}{root};

Legend:
Removed from v.2438  
changed lines
  Added in v.3691

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9