[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 2431 - (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 : dpvc 2431 # $CVSHeader: webwork-modperl/conf/global.conf.dist,v 1.80 2004/06/26 20:40:17 jj Exp $
6 : sh002i 1663 #
7 :     # This program is free software; you can redistribute it and/or modify it under
8 :     # the terms of either: (a) the GNU General Public License as published by the
9 :     # Free Software Foundation; either version 2, or (at your option) any later
10 :     # version, or (b) the "Artistic License" which comes with this package.
11 :     #
12 :     # This program is distributed in the hope that it will be useful, but WITHOUT
13 :     # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14 :     # FOR A PARTICULAR PURPOSE. See either the GNU General Public License or the
15 :     # Artistic License for more details.
16 : sh002i 654 ################################################################################
17 :    
18 :     # This file is used to set up the default WeBWorK course environment for all
19 :     # requests. Values may be overwritten by the course.conf for a specific course.
20 :     # All package variables set in this file are added to the course environment.
21 :     # If you wish to set a variable here but omit it from the course environment,
22 :     # use the "my" keyword. The following variables are available to this file:
23 :     #
24 :     # $webworkRoot directory that contains the WeBWorK distribution
25 : sh002i 2315 # $webworkURLRoot base URL handled by Apache::WeBWorK
26 : sh002i 1051 # $pgRoot directory that contains the PG distribution
27 : sh002i 654 # $courseName name of the course being used
28 :    
29 :     ################################################################################
30 : sh002i 663 # WeBWorK settings
31 :     ################################################################################
32 : sh002i 654
33 :     %webworkDirs = (
34 : sh002i 1519 root => "$webworkRoot",
35 :     DATA => "$webworkRoot/DATA",
36 : sh002i 1617 uploadCache => "$webworkRoot/DATA/uploads",
37 : sh002i 1519 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 : gage 2261 local_help => "$webworkRoot/htdocs/helpFiles",
44 : sh002i 1519 lib => "$webworkRoot/lib",
45 :     logs => "$webworkRoot/logs",
46 :     macros => "$pgRoot/macros",
47 :     tmp => "$webworkRoot/tmp",
48 : sh002i 654 );
49 :    
50 :     %webworkFiles = (
51 : gage 1021 environment => "$webworkDirs{conf}/global.conf",
52 :     hardcopySnippets => {
53 : sh002i 1100 preamble => "$webworkDirs{conf}/snippets/hardcopyPreamble.tex",
54 : gage 2182 setHeader => "$webworkDirs{conf}/snippets/setHeader.pg", # hardcopySetHeader.pg",
55 : sh002i 1100 problemDivider => "$webworkDirs{conf}/snippets/hardcopyProblemDivider.tex",
56 :     setFooter => "$webworkDirs{conf}/snippets/hardcopySetFooter.pg",
57 :     setDivider => "$webworkDirs{conf}/snippets/hardcopySetDivider.tex",
58 : gage 1114 userDivider => "$webworkDirs{conf}/snippets/hardcopyUserDivider.tex",
59 : sh002i 1100 postamble => "$webworkDirs{conf}/snippets/hardcopyPostamble.tex",
60 : sh002i 654 },
61 :     screenSnippets => {
62 : gage 2182 setHeader => "$webworkDirs{conf}/snippets/setHeader.pg", # screenSetHeader.pg",
63 : sh002i 654 },
64 :     logs => {
65 : gage 1021 timing => "$webworkDirs{logs}/timing.log",
66 : sh002i 654 },
67 : jj 2410 # Set this to "" if you don't want to use the equation cache file
68 : sh002i 1519 equationCacheDB => "$webworkDirs{DATA}/equationcache",
69 : sh002i 654 );
70 :    
71 :     %webworkURLs = (
72 : sh002i 1519 root => "$webworkURLRoot",
73 :     home => "/webwork2_files/index.html",
74 :     htdocs => "/webwork2_files",
75 :     htdocs_temp => "/webwork2_files/tmp",
76 :     equationCache => "/webwork2_files/tmp/equations",
77 :     docs => "http://webhost.math.rochester.edu/webworkdocs/docs",
78 : jj 2172 local_help => "/webwork2_files/helpFiles",
79 : sh002i 1801 oldProf => "/webwork1/profLogin.pl",
80 : sh002i 2381 bugReporter => "http://bugs.webwork.rochester.edu/enter_bug.cgi?product=WeBWorK%20mod_perl",
81 : gage 2174 jsMath => "/webwork2_files/jsMath/jsMath.js",
82 : dpvc 2200 asciimath => "/webwork2_files/ASCIIMathML/ASCIIMathML.js",
83 : sh002i 654 );
84 :    
85 : sh002i 663 ################################################################################
86 :     # Default course-specific settings
87 :     ################################################################################
88 :    
89 :     my $courseRoot = "$webworkDirs{courses}/$courseName";
90 :     %courseDirs = (
91 :     root => "$courseRoot",
92 :     DATA => "$courseRoot/DATA",
93 :     auth_DATA => "$courseRoot/DATA/.auth",
94 :     html => "$courseRoot/html",
95 :     html_images => "$courseRoot/html/images",
96 :     html_temp => "$courseRoot/html/tmp",
97 :     logs => "$courseRoot/logs",
98 :     scoring => "$courseRoot/scoring",
99 :     templates => "$courseRoot/templates",
100 :     macros => "$courseRoot/templates/macros",
101 : gage 1380 email => "$courseRoot/templates/email",
102 : sh002i 663 );
103 :    
104 :     %courseFiles = (
105 :     environment => "$courseDirs{root}/course.conf",
106 : gage 1751 motd => "$courseDirs{templates}/motd.txt",
107 : gage 1387 logs => {
108 :     answer_log => "$courseDirs{logs}/answer_log",
109 :     },
110 : gage 1793 course_info => "course_info.txt", # path relative to templates directory
111 :     login_info => "login_info.txt", # path relative to templates directory
112 : sh002i 663 );
113 :    
114 : dpvc 2431 #
115 :     # Additional library buttons can be added to the Library Browser (SetMaker.pm)
116 :     # by adding the libraries you want to the following line. For each key=>value
117 :     # in the list, if a directory (or link to a directory) with name 'key' appears
118 :     # in the templates directory, then a button with name 'value' will be placed at
119 :     # the top of the problem browser. (No button will appear if there is no directory
120 :     # or link with the given name in the templates directory.) For example,
121 :     #
122 :     # $courseFiles{problibs} = {rochester => "Rochester", asu => "ASU"};
123 :     #
124 :     # would add two buttons, one for the Rochester library and one for the ASU
125 :     # library, provided templates/rochester and templates/asu exists.
126 :     #
127 :     $courseFiles{problibs} = {};
128 :    
129 :    
130 : sh002i 705 # quick hack to fix transaction logging. blah.
131 : sh002i 1032 $webworkFiles{logs}->{transaction} = "$courseDirs{logs}/transaction.log";
132 :     $webworkFiles{logs}->{pastAnswerList} = "$courseDirs{logs}/past_answers.log";
133 : sh002i 705
134 : sh002i 2119 my $courseURLRoot = "/webwork2_course_files/$courseName";
135 : sh002i 654 %courseURLs = (
136 : sh002i 699 root => "$courseURLRoot",
137 : sh002i 654 html => "$courseURLRoot",
138 :     html_temp => "$courseURLRoot/tmp",
139 :     );
140 :    
141 :     ################################################################################
142 : sh002i 663 # Other site-specific options
143 :     ################################################################################
144 : sh002i 654
145 : sh002i 663 %mail = (
146 : gage 1793 smtpServer => "mail.math.rochester.edu",
147 :     smtpSender => "webwork\@math.rochester.edu",
148 : sh002i 1801
149 : sh002i 705 # allowedRecipients defines addresses that the PG system is allowed to
150 :     # send mail to. this prevents subtle PG exploits. This should be set
151 :     # in course.conf to the addresses of professors of each course. Sending
152 :     # mail from the PG system (i.e. questionaires, essay questions) will
153 :     # fail if this is not set somewhere (either here or in course.conf).
154 : sh002i 706 #allowedRecipients => [
155 : sh002i 1801 # 'prof1@host.yourdomain.edu',
156 :     # 'prof2@host.yourdomain.edu',
157 : sh002i 706 #],
158 : sh002i 1801
159 : sh002i 705 # if defined, feedbackRecipients overrides the list of recipients for
160 :     # feedback email. It's appropriate to set this in the course.conf for
161 :     # specific courses, but probably not in global.conf. if not defined,
162 :     # mail is sent to all professors and TAs for a given course
163 :     #feedbackRecipients => [
164 : sh002i 1787 # 'prof1@host.yourdomain.edu',
165 :     # 'prof2@host.yourdomain.edu',
166 : sh002i 705 #],
167 : sh002i 1801
168 : sh002i 740 # feedbackVerbosity:
169 :     # 0: send only the feedback comment and context link
170 :     # 1: as in 0, plus user, set, problem, and PG data
171 :     # 2: as in 1, plus the problem environment (debugging data)
172 : sh002i 1801 feedbackVerbosity => 1,
173 :    
174 :     # defines the size of the Mail Merge editor window
175 :     # FIXME: should this be here? it's UI, not mail
176 :     # FIXME: replace this with the auto-size method that TWiki uses
177 :     editor_window_rows => 15,
178 :     editor_window_columns => 100,
179 : sh002i 654 );
180 :    
181 : sh002i 663 %externalPrograms = (
182 : sh002i 737 mkdir => "/bin/mkdir",
183 : sh002i 663 tth => "/usr/local/bin/tth",
184 :     pdflatex => "/usr/local/bin/pdflatex",
185 :     latex => "/usr/local/bin/latex",
186 : sh002i 1154 dvipng => "/usr/local/bin/dvipng",
187 : sh002i 663 gif2eps => "$webworkDirs{bin}/gif2eps",
188 :     png2eps => "$webworkDirs{bin}/png2eps",
189 :     gif2png => "$webworkDirs{bin}/gif2png",
190 : sh002i 1945 mysql => "/usr/local/bin/mysql",
191 : sh002i 663 );
192 :    
193 : toenail 2111 %siteDefaults = (
194 :     status => {
195 :     audit => "Audit",
196 :     A => "Audit",
197 :     drop => "Drop",
198 :     D => "Drop",
199 :     withdraw => "Drop",
200 :     current => "Enrolled",
201 :     C => "Enrolled",
202 :     enrolled => "Enrolled",
203 :     },
204 :     );
205 :    
206 : sh002i 663 ################################################################################
207 :     # Frontend options
208 :     ################################################################################
209 :    
210 : sh002i 654 %templates = (
211 : sh002i 1100 system => "$webworkDirs{conf}/templates/ur.template",
212 : sh002i 654 );
213 :    
214 : sh002i 663 ################################################################################
215 : sh002i 1108 # Database options
216 : sh002i 663 ################################################################################
217 :    
218 : sh002i 1696 # Several database are defined in the file conf/database.conf and stored in the
219 :     # hash %dbLayouts.
220 :     include "conf/database.conf";
221 : sh002i 768
222 : sh002i 1696 # Select the default database layout. This can be overridden in the course.conf
223 :     # file of a particular course.
224 : sh002i 1801 #$dbLayoutName = "sql";
225 :     $dbLayoutName = "gdbm";
226 : gage 1099
227 : sh002i 1801 *dbLayout = $dbLayouts{$dbLayoutName};
228 :    
229 : sh002i 1108 ################################################################################
230 : sh002i 2146 # Problem library options
231 :     ################################################################################
232 :    
233 :     %problemLibrary = (
234 :     root => "", # set to the top of the problem library, if its installed
235 :     sourceSQL => "ProblemLibrary",
236 :     userSQL => "webworkRead",
237 :     passwordSQL => "",
238 :     );
239 :    
240 :     ################################################################################
241 : sh002i 1108 # Authorization system
242 :     ################################################################################
243 :    
244 :     # This lets you specify a minimum permission level needed to perform certain
245 :     # actions. In the current system, >=10 will allow a professor to perform the
246 :     # action, >=5 will allow a TA to, and >=0 will allow a student to perform an
247 :     # action (almost never what you want).
248 : sh002i 2381 my $student = 0;
249 : gage 1021 my $ta = 5;
250 :     my $professor = 10;
251 : sh002i 654 %permissionLevels = (
252 : sh002i 2381 report_bugs => $student,
253 : toenail 2376 view_multiple_sets => $ta,
254 :     view_unopened_sets => $ta,
255 :     view_unpublished_sets => $ta,
256 :     view_answers => $ta,
257 : sh002i 1108 become_student => $professor,
258 :     access_instructor_tools => $ta,
259 :     create_and_delete_problem_sets => $professor,
260 :     modify_problem_sets => $professor,
261 :     assign_problem_sets => $professor,
262 : malsyned 1210 modify_student_data => $professor,
263 : malsyned 1446 score_sets => $professor,
264 : toenail 2376 send_mail => $professor,
265 : sh002i 1617 modify_classlist_files => $professor,
266 :     modify_set_def_files => $professor,
267 : sh002i 2000 modify_scoring_files => $professor,
268 : gage 2027 create_and_delete_courses => $professor,
269 : sh002i 2309 fix_course_databases => $professor,
270 : sh002i 654 );
271 :    
272 : sh002i 1108 ################################################################################
273 :     # Session options
274 :     ################################################################################
275 :    
276 : sh002i 768 # $sessionKeyTimeout defines seconds of inactivity before a key expires
277 :     $sessionKeyTimeout = 60*30;
278 :    
279 : sh002i 811 # $sessionKeyLength defines the length (in characters) of the session key
280 :     $sessionKeyLength = 40;
281 :    
282 :     # @sessionKeyChars lists the legal session key characters
283 :     @sessionKeyChars = ('A'..'Z', 'a'..'z', '0'..'9', '.', '^', '/', '!', '*');
284 :    
285 : sh002i 768 # Practice users are users who's names start with $practiceUser
286 :     # (you can comment this out to remove practice user support)
287 :     $practiceUserPrefix = "practice";
288 :    
289 :     # There is a practice user who can be logged in multiple times. He's
290 :     # commented out by default, though, so you don't hurt yourself. It is
291 :     # kindof a backdoor to the practice user system, since he doesn't have a
292 :     # password. Come to think of it, why do we even have this?!
293 :     #$debugPracticeUser = "practice666";
294 :    
295 : sh002i 663 ################################################################################
296 :     # PG translation options
297 :     ################################################################################
298 : sh002i 654
299 :     %pg = (
300 : sh002i 2192 # available display modes
301 : dpvc 2200 displayModes => [ qw(plainText formattedText images jsMath asciimath) ],
302 : sh002i 2192 # pg options
303 :     options => {
304 :     # default translation options
305 :     displayMode => "images",
306 :     showOldAnswers => 1,
307 :     showCorrectAnswers => 0,
308 :     showHints => 0,
309 :     showSolutions => 0,
310 :     catchWarnings => 0, # there's a global warning catcher now
311 :     # default grader
312 :     grader => "avg_problem_grader",
313 :     },
314 : sh002i 1240 # options for various renderers
315 :     renderers => {
316 :     "WeBWorK::PG::Remote" => {
317 : sh002i 1560 proxy => "http://localhost:21000/RenderD"
318 : jj 2413 },
319 :    
320 :     # next can be baseline, absmiddle, or mysql
321 :     dvipng_align => 'baseline',
322 :    
323 :     # if we choose mysql, we need information on connecting
324 :     # to the database. Whatever you use here, you have to
325 :     # create the database and grant read/write priveleges to
326 :     # the user listed here
327 : jj 2417 # To create the database in mysql, as root use:
328 :    
329 :     # create database DvipngDepths;
330 :     # use DvipngDepths;
331 :     # create table depths ( md5 char(33) not null, depth smallint, PRIMARY KEY (md5)) ;
332 :     # grant ALL on DvipngDepths.* to webworkWrite;
333 :    
334 :     # In the last statement, "webworkWrite" should match the
335 :     # user below
336 :    
337 : jj 2413 dvipng_depth_db => {
338 :     dbsource => 'dbi:mysql:DvipngDepths',
339 :     user => $dbLayouts{sql}->{password}->{params}->{usernameRW},
340 :     passwd => $dbLayouts{sql}->{password}->{params}->{passwordRW},
341 : sh002i 1240 }
342 :     },
343 :     # currently selected renderer
344 : sh002i 1242 renderer => "WeBWorK::PG::Local",
345 : sh002i 1560 #renderer => "WeBWorK::PG::Remote",
346 : sh002i 1240 # directories used by PG
347 : sh002i 1108 directories => {
348 : gage 1380 # directories used only by PG
349 : sh002i 1957 root => "$pgRoot",
350 : sh002i 1108 lib => "$pgRoot/lib",
351 :     macros => "$pgRoot/macros",
352 : sh002i 1240 },
353 : jj 2216 # this can be customized in the course.conf file
354 : gage 1099 specialPGEnvironmentVars => {
355 : sh002i 1704 PRINT_FILE_NAMES_FOR => [ qw(professor) ],
356 : sh002i 1240 CAPA_Tools => "$courseDirs{macros}/CAPA_Tools/",
357 :     CAPA_MCTools => "$courseDirs{macros}/CAPA_MCTools/",
358 : sh002i 1897 CAPA_Graphics_URL => "$courseURLs{html}/CAPA_Graphics/",
359 :     CAPA_GraphicsDirectory => "$courseDirs{html}/CAPA_Graphics/",
360 : jj 2216 onTheFlyImageSize => 400,
361 : malsyned 1103 },
362 : sh002i 654 # modules lists module names and the packages each contains
363 :     modules => [
364 :     [qw(DynaLoader)],
365 :     [qw(Exporter)],
366 :     [qw(GD)],
367 :    
368 :     [qw(AlgParser AlgParserWithImplicitExpand Expr ExprWithImplicitExpand)],
369 :     [qw(AnswerHash AnswerEvaluator)],
370 :     [qw(WWPlot)], # required by Circle (and others)
371 :     [qw(Circle)],
372 :     [qw(Complex)],
373 :     [qw(Complex1)],
374 :     [qw(Distributions)],
375 :     [qw(Fraction)],
376 :     [qw(Fun)],
377 :     [qw(Hermite)],
378 :     [qw(Label)],
379 :     [qw(List)],
380 :     [qw(Match)],
381 :     [qw(MatrixReal1)], # required by Matrix
382 :     [qw(Matrix)],
383 :     [qw(Multiple)],
384 :     [qw(PGrandom)],
385 :     [qw(Regression)],
386 :     [qw(Select)],
387 :     [qw(Units)],
388 :     [qw(VectorField)],
389 :     ],
390 :     # defaults used by answer evaluators
391 :     ansEvalDefaults => {
392 :     functAbsTolDefault => .001,
393 :     functLLimitDefault => .0000001,
394 :     functMaxConstantOfIntegration => 1E8,
395 :     functNumOfPoints => 3,
396 :     functRelPercentTolDefault => .1,
397 :     functULimitDefault => .9999999,
398 :     functVarDefault => "x",
399 :     functZeroLevelDefault => 1E-14,
400 :     functZeroLevelTolDefault => 1E-12,
401 :     numAbsTolDefault => .001,
402 :     numFormatDefault => "",
403 :     numRelPercentTolDefault => .1,
404 :     numZeroLevelDefault => 1E-14,
405 :     numZeroLevelTolDefault => 1E-12,
406 : jj 1932 useBaseTenLog => 0,
407 : jj 1965 defaultDisplayMatrixStyle => "[s]",
408 : sh002i 654 },
409 :     );

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9