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

Legend:
Removed from v.2325  
changed lines
  Added in v.2439

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9