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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2519 - (view) (download)

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

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9