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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9