[system] / trunk / webwork-modperl / conf / global.conf.dist Repository:
ViewVC logotype

Annotation of /trunk/webwork-modperl/conf/global.conf.dist

Parent Directory Parent Directory | Revision Log Revision Log


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

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9