[system] / trunk / webwork-modperl / conf / global.conf.dist Repository:
ViewVC logotype

Diff of /trunk/webwork-modperl/conf/global.conf.dist

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

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

Legend:
Removed from v.1794  
changed lines
  Added in v.2516

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9