[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 3069 - (view) (download)

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

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9