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

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

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

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

Legend:
Removed from v.1099  
changed lines
  Added in v.2515

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9