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

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9