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

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

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

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

Legend:
Removed from v.1387  
changed lines
  Added in v.2857

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9