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

Annotation of /branches/rel-2-4-dev/webwork-modperl/conf/global.conf.dist

Parent Directory Parent Directory | Revision Log Revision Log


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

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9