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

Annotation of /branches/rel-2-1-patches/webwork-modperl/conf/global.conf.dist

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1032 - (view) (download)
Original Path: trunk/webwork-modperl/conf/global.conf.dist

1 : sh002i 654 #!perl
2 :     ################################################################################
3 :     # WeBWorK mod_perl (c) 1995-2002 WeBWorK Team, Univeristy of Rochester
4 : sh002i 1032 # $Id: global.conf.dist,v 1.21 2003-06-05 20:48:39 sh002i Exp $
5 : sh002i 654 ################################################################################
6 :    
7 :     # This file is used to set up the default WeBWorK course environment for all
8 :     # requests. Values may be overwritten by the course.conf for a specific course.
9 :     # All package variables set in this file are added to the course environment.
10 :     # If you wish to set a variable here but omit it from the course environment,
11 :     # use the "my" keyword. The following variables are available to this file:
12 :     #
13 :     # $webworkRoot directory that contains the WeBWorK distribution
14 : sh002i 695 # $webworkURL base URL handled by Apache::WeBWorK
15 : sh002i 654 # $courseName name of the course being used
16 :    
17 :     ################################################################################
18 : sh002i 663 # WeBWorK settings
19 :     ################################################################################
20 : sh002i 654
21 :     %webworkDirs = (
22 :     root => "$webworkRoot",
23 :     bin => "$webworkRoot/bin",
24 :     conf => "$webworkRoot/conf",
25 : sh002i 655 courses => "$webworkRoot/courses",
26 : sh002i 654 lib => "$webworkRoot/lib",
27 :     logs => "$webworkRoot/logs",
28 :     macros => "$webworkRoot/macros",
29 :     tmp => "$webworkRoot/tmp",
30 :     );
31 :    
32 :     %webworkFiles = (
33 : gage 1021 environment => "$webworkDirs{conf}/global.conf",
34 :     hardcopySnippets => {
35 : sh002i 654 preamble => "$webworkDirs{conf}/hardcopyPreamble.tex",
36 :     setHeader => "$webworkDirs{conf}/hardcopySetHeader.pg",
37 :     problemDivider => "$webworkDirs{conf}/hardcopyProblemDivider.tex",
38 :     setFooter => "$webworkDirs{conf}/hardcopySetFooter.pg",
39 :     setDivider => "$webworkDirs{conf}/hardcopySetDivider.tex",
40 :     postamble => "$webworkDirs{conf}/hardcopyPostamble.tex",
41 :     },
42 :     screenSnippets => {
43 :     setHeader => "$webworkDirs{conf}/screenSetHeader.pg",
44 :     },
45 :     logs => {
46 : gage 1021 timing => "$webworkDirs{logs}/timing.log",
47 : sh002i 654 },
48 :     );
49 :    
50 :     %webworkURLs = (
51 : malsyned 670 root => "$webworkURLRoot",
52 : gage 1021 home => "/webwork2_files/index.html",
53 :     htdocs => "/webwork2_files",
54 : malsyned 670 docs => "http://webhost.math.rochester.edu/webworkdocs/docs",
55 :     oldProf => "/webwork-old/profLogin.pl",
56 : sh002i 654 );
57 :    
58 : sh002i 663 ################################################################################
59 :     # Default course-specific settings
60 :     ################################################################################
61 :    
62 :     my $courseRoot = "$webworkDirs{courses}/$courseName";
63 :     %courseDirs = (
64 :     root => "$courseRoot",
65 :     DATA => "$courseRoot/DATA",
66 :     auth_DATA => "$courseRoot/DATA/.auth",
67 :     html => "$courseRoot/html",
68 :     html_images => "$courseRoot/html/images",
69 :     html_temp => "$courseRoot/html/tmp",
70 :     logs => "$courseRoot/logs",
71 :     scoring => "$courseRoot/scoring",
72 :     templates => "$courseRoot/templates",
73 :     macros => "$courseRoot/templates/macros",
74 :     );
75 :    
76 :     %courseFiles = (
77 :     environment => "$courseDirs{root}/course.conf",
78 : sh002i 701 motd => "$courseDirs{root}/motd.txt",
79 : sh002i 663 );
80 :    
81 : sh002i 705 # quick hack to fix transaction logging. blah.
82 : sh002i 1032 $webworkFiles{logs}->{transaction} = "$courseDirs{logs}/transaction.log";
83 :     $webworkFiles{logs}->{pastAnswerList} = "$courseDirs{logs}/past_answers.log";
84 : sh002i 705
85 : sh002i 663 my $courseURLRoot = "$webworkURLs{htdocs}/courses/$courseName";
86 : sh002i 654 %courseURLs = (
87 : sh002i 699 root => "$courseURLRoot",
88 : sh002i 654 html => "$courseURLRoot",
89 :     html_temp => "$courseURLRoot/tmp",
90 :     );
91 :    
92 :     ################################################################################
93 : sh002i 663 # Other site-specific options
94 :     ################################################################################
95 : sh002i 654
96 : sh002i 663 %mail = (
97 :     smtpServer => "mail.math.rochester.edu",
98 :     smtpSender => "webwork\@math.rochester.edu",
99 : sh002i 705 # allowedRecipients defines addresses that the PG system is allowed to
100 :     # send mail to. this prevents subtle PG exploits. This should be set
101 :     # in course.conf to the addresses of professors of each course. Sending
102 :     # mail from the PG system (i.e. questionaires, essay questions) will
103 :     # fail if this is not set somewhere (either here or in course.conf).
104 : sh002i 706 #allowedRecipients => [
105 :     # "yourname\@host.yourdomain.edu",
106 :     #],
107 : sh002i 705 # if defined, feedbackRecipients overrides the list of recipients for
108 :     # feedback email. It's appropriate to set this in the course.conf for
109 :     # specific courses, but probably not in global.conf. if not defined,
110 :     # mail is sent to all professors and TAs for a given course
111 :     #feedbackRecipients => [
112 :     # "prof1\@host.yourdomain.edu",
113 :     # "prof2\@host.yourdomain.edu",
114 :     #],
115 : sh002i 740 # feedbackVerbosity:
116 :     # 0: send only the feedback comment and context link
117 :     # 1: as in 0, plus user, set, problem, and PG data
118 :     # 2: as in 1, plus the problem environment (debugging data)
119 :     feedbackVerbosity => 1,
120 : sh002i 654 );
121 :    
122 : sh002i 663 %externalPrograms = (
123 : sh002i 737 mkdir => "/bin/mkdir",
124 : sh002i 663 tth => "/usr/local/bin/tth",
125 :     pdflatex => "/usr/local/bin/pdflatex",
126 :     latex => "/usr/local/bin/latex",
127 :     dvipng => "/usr/local/bin/dvipng -mode ljfivemp -D600 -Q6 -x1000.5 -bgTransparent",
128 :     gif2eps => "$webworkDirs{bin}/gif2eps",
129 :     png2eps => "$webworkDirs{bin}/png2eps",
130 :     gif2png => "$webworkDirs{bin}/gif2png",
131 :     );
132 :    
133 :     ################################################################################
134 :     # Frontend options
135 :     ################################################################################
136 :    
137 : sh002i 654 %templates = (
138 :     system => "$webworkDirs{conf}/barebones.template",
139 :     );
140 :    
141 : sh002i 663 ################################################################################
142 :     # Database and session
143 :     ################################################################################
144 : gage 1021 # temporary values needed for using both GDBM databases.
145 :     # Use auser name for which all problems have been built, and none have
146 :     # been specifically reassigned.
147 :     #FIXME !!!! what hack!!!!!!
148 : sh002i 663
149 : gage 1021 $dbLayout{set}->{params}->{globalUserID} = "practice1";
150 :     $dbLayout{problem}->{params}->{globalUserID} = "practice1";
151 :    
152 : sh002i 768 # dbInfo records some data for the "old" WW/Classlist/Auth.pm database system
153 :     # {auth,wwdb,cldb}_type = database type: GDBM currently implemented
154 :     # {auth_passwd,auth_perm,auth_keys,wwdb,cldb}_file = path to database file
155 : sh002i 663 %dbInfo = (
156 :     auth_type => "GDBM",
157 :     auth_passwd_file => "$courseDirs{auth_DATA}/$courseName\_password_DB",
158 :     auth_perm_file => "$courseDirs{auth_DATA}/$courseName\_permissions_DB",
159 :     auth_keys_file => "$courseDirs{auth_DATA}/keys",
160 :     wwdb_type => "GDBM",
161 :     wwdb_file => "$courseDirs{DATA}/$courseName\_webwork_DB",
162 :     cldb_type => "GDBM",
163 :     cldb_file => "$courseDirs{DATA}/$courseName\_classlist_DB",
164 :     psvn_digits => 5,
165 :     );
166 :    
167 : sh002i 768 # dbLayout records the schema and source for each table in the "new" DB.pm
168 :     # database system. consult DB.pm for the authoritative list of tables.
169 :     # schema = perl module to use for access to the table
170 :     # driver = perl module to use for access to the data source
171 :     # source = location of data source (i.e. path, url, DBI spec)
172 : sh002i 808 # params = extra information needed by the schema (optional)
173 : sh002i 768 # note: schema and driver must have the same interface.
174 :     %dbLayout = (
175 :     password => {
176 : sh002i 798 record => "WeBWorK::DB::Record::Password",
177 :     schema => "WeBWorK::DB::Schema::Auth1Hash",
178 : sh002i 768 driver => "WeBWorK::DB::Driver::GDBM",
179 :     source => "$courseDirs{auth_DATA}/$courseName\_password_DB",
180 :     },
181 :     permission => {
182 : sh002i 798 record => "WeBWorK::DB::Record::PermissionLevel",
183 :     schema => "WeBWorK::DB::Schema::Auth1Hash",
184 : sh002i 768 driver => "WeBWorK::DB::Driver::GDBM",
185 : sh002i 798 source => "$courseDirs{auth_DATA}/$courseName\_permissions_DB",
186 : sh002i 768 },
187 : sh002i 774 key => {
188 : sh002i 798 record => "WeBWorK::DB::Record::Key",
189 :     schema => "WeBWorK::DB::Schema::Auth1Hash",
190 : sh002i 768 driver => "WeBWorK::DB::Driver::GDBM",
191 : sh002i 798 source => "$courseDirs{auth_DATA}/keys",
192 : sh002i 768 },
193 : sh002i 774 user => {
194 : sh002i 798 record => "WeBWorK::DB::Record::User",
195 :     schema => "WeBWorK::DB::Schema::Classlist1Hash",
196 : sh002i 774 driver => "WeBWorK::DB::Driver::GDBM",
197 : sh002i 798 source => "$courseDirs{DATA}/$courseName\_classlist_DB",
198 : sh002i 774 },
199 : sh002i 768 set => {
200 : sh002i 798 record => "WeBWorK::DB::Record::Set",
201 : gage 1021 schema => "WeBWorK::DB::Schema::GlobalTableEmulator",
202 : sh002i 808 driver => "WeBWorK::DB::Driver::Null",
203 :     source => undef,
204 : sh002i 768 },
205 :     set_user => {
206 : sh002i 798 record => "WeBWorK::DB::Record::UserSet",
207 : sh002i 768 schema => "WeBWorK::DB::Schema::WW1Hash",
208 :     driver => "WeBWorK::DB::Driver::GDBM",
209 : sh002i 798 source => "$courseDirs{DATA}/$courseName\_webwork_DB",
210 : sh002i 808 params => { psvnLength => 5 },
211 : sh002i 768 },
212 :     problem => {
213 : sh002i 798 record => "WeBWorK::DB::Record::Problem",
214 : gage 1021 schema => "WeBWorK::DB::Schema::GlobalTableEmulator",
215 : sh002i 808 driver => "WeBWorK::DB::Driver::Null",
216 :     source => undef,
217 : sh002i 768 },
218 :     problem_user => {
219 : sh002i 798 record => "WeBWorK::DB::Record::UserProblem",
220 : sh002i 768 schema => "WeBWorK::DB::Schema::WW1Hash",
221 :     driver => "WeBWorK::DB::Driver::GDBM",
222 : sh002i 798 source => "$courseDirs{DATA}/$courseName\_webwork_DB",
223 : sh002i 808 params => { psvnLength => 5 },
224 : sh002i 768 },
225 :     );
226 :    
227 : sh002i 654 # This lets you specify a minimum permission level needed to perform
228 :     # certain actions. In the current system, >=10 will allow a professor
229 :     # to perform the action, >=5 will allow a TA to, and >=0 will allow a
230 :     # student to perform an action (almost never what you want).
231 : gage 1021 my $ta = 5;
232 :     my $professor = 10;
233 : sh002i 654 %permissionLevels = (
234 :     "become_student" => 10,
235 : malsyned 1017 "access_instructor_tools" => $ta,
236 :     "create_and_delete_problem_sets" => $professor,
237 :     "modify_problem_sets" => $professor,
238 :     "assign_problem_sets" => $professor,
239 : sh002i 654 );
240 :    
241 : sh002i 768 # $sessionKeyTimeout defines seconds of inactivity before a key expires
242 :     $sessionKeyTimeout = 60*30;
243 :    
244 : sh002i 811 # $sessionKeyLength defines the length (in characters) of the session key
245 :     $sessionKeyLength = 40;
246 :    
247 :     # @sessionKeyChars lists the legal session key characters
248 :     @sessionKeyChars = ('A'..'Z', 'a'..'z', '0'..'9', '.', '^', '/', '!', '*');
249 :    
250 : sh002i 768 # Practice users are users who's names start with $practiceUser
251 :     # (you can comment this out to remove practice user support)
252 :     $practiceUserPrefix = "practice";
253 :    
254 :     # There is a practice user who can be logged in multiple times. He's
255 :     # commented out by default, though, so you don't hurt yourself. It is
256 :     # kindof a backdoor to the practice user system, since he doesn't have a
257 :     # password. Come to think of it, why do we even have this?!
258 :     #$debugPracticeUser = "practice666";
259 :    
260 : sh002i 663 ################################################################################
261 :     # PG translation options
262 :     ################################################################################
263 : sh002i 654
264 :     %pg = (
265 :     options => {
266 : sh002i 663 # default translation options
267 : sh002i 654 displayMode => "images",
268 :     showOldAnswers => 1,
269 :     showCorrectAnswers => 0,
270 :     showHints => 0,
271 :     showSolutions => 0,
272 : sh002i 663 catchWarnings => 1,
273 : sh002i 654 # default grader
274 :     grader => "avg_problem_grader",
275 :     },
276 :     # modules lists module names and the packages each contains
277 :     modules => [
278 :     [qw(DynaLoader)],
279 :     [qw(Exporter)],
280 :     [qw(GD)],
281 :    
282 :     [qw(AlgParser AlgParserWithImplicitExpand Expr ExprWithImplicitExpand)],
283 :     [qw(AnswerHash AnswerEvaluator)],
284 :     [qw(WWPlot)], # required by Circle (and others)
285 :     [qw(Circle)],
286 :     [qw(Complex)],
287 :     [qw(Complex1)],
288 :     [qw(Distributions)],
289 :     [qw(Fraction)],
290 :     [qw(Fun)],
291 :     [qw(Hermite)],
292 :     [qw(Label)],
293 :     [qw(List)],
294 :     [qw(Match)],
295 :     [qw(MatrixReal1)], # required by Matrix
296 :     [qw(Matrix)],
297 :     [qw(Multiple)],
298 :     [qw(PGrandom)],
299 :     [qw(Regression)],
300 :     [qw(Select)],
301 :     [qw(Units)],
302 :     [qw(VectorField)],
303 :     ],
304 :     # defaults used by answer evaluators
305 :     ansEvalDefaults => {
306 :     functAbsTolDefault => .001,
307 :     functLLimitDefault => .0000001,
308 :     functMaxConstantOfIntegration => 1E8,
309 :     functNumOfPoints => 3,
310 :     functRelPercentTolDefault => .1,
311 :     functULimitDefault => .9999999,
312 :     functVarDefault => "x",
313 :     functZeroLevelDefault => 1E-14,
314 :     functZeroLevelTolDefault => 1E-12,
315 :     numAbsTolDefault => .001,
316 :     numFormatDefault => "",
317 :     numRelPercentTolDefault => .1,
318 :     numZeroLevelDefault => 1E-14,
319 :     numZeroLevelTolDefault => 1E-12,
320 :     },
321 :     );

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9