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

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9