[system] / trunk / webwork2 / conf / global.conf.dist Repository:
ViewVC logotype

Annotation of /trunk/webwork2/conf/global.conf.dist

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1021 - (view) (download)

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

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9