[system] / branches / rel-2-0-patches / webwork-modperl / conf / global.conf.dist Repository:
ViewVC logotype

Annotation of /branches/rel-2-0-patches/webwork-modperl/conf/global.conf.dist

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2505 - (view) (download)
Original Path: trunk/webwork-modperl/conf/global.conf.dist

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

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9