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

Legend:
Removed from v.671  
changed lines
  Added in v.3224

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9