| 1 | #!perl |
1 | #!perl |
| 2 | ################################################################################ |
2 | ################################################################################ |
| 3 | # WeBWorK mod_perl (c) 1995-2002 WeBWorK Team, Univeristy of Rochester |
3 | # WeBWorK mod_perl (c) 1995-2002 WeBWorK Team, Univeristy of Rochester |
| 4 | # $Id: global.conf.dist,v 1.9 2003-01-10 21:39:28 sh002i Exp $ |
4 | # $Id: global.conf.dist,v 1.21 2003-06-05 20:48:39 sh002i Exp $ |
| 5 | ################################################################################ |
5 | ################################################################################ |
| 6 | |
6 | |
| 7 | # This file is used to set up the default WeBWorK course environment for all |
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. |
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. |
9 | # All package variables set in this file are added to the course environment. |
| … | |
… | |
| 28 | macros => "$webworkRoot/macros", |
28 | macros => "$webworkRoot/macros", |
| 29 | tmp => "$webworkRoot/tmp", |
29 | tmp => "$webworkRoot/tmp", |
| 30 | ); |
30 | ); |
| 31 | |
31 | |
| 32 | %webworkFiles = ( |
32 | %webworkFiles = ( |
| 33 | environment => "$webworkDirs{conf}/global.conf", |
33 | environment => "$webworkDirs{conf}/global.conf", |
| 34 | hardcopySnippets => { |
34 | hardcopySnippets => { |
| 35 | preamble => "$webworkDirs{conf}/hardcopyPreamble.tex", |
35 | preamble => "$webworkDirs{conf}/hardcopyPreamble.tex", |
| 36 | setHeader => "$webworkDirs{conf}/hardcopySetHeader.pg", |
36 | setHeader => "$webworkDirs{conf}/hardcopySetHeader.pg", |
| 37 | problemDivider => "$webworkDirs{conf}/hardcopyProblemDivider.tex", |
37 | problemDivider => "$webworkDirs{conf}/hardcopyProblemDivider.tex", |
| 38 | setFooter => "$webworkDirs{conf}/hardcopySetFooter.pg", |
38 | setFooter => "$webworkDirs{conf}/hardcopySetFooter.pg", |
| 39 | setDivider => "$webworkDirs{conf}/hardcopySetDivider.tex", |
39 | setDivider => "$webworkDirs{conf}/hardcopySetDivider.tex", |
| … | |
… | |
| 41 | }, |
41 | }, |
| 42 | screenSnippets => { |
42 | screenSnippets => { |
| 43 | setHeader => "$webworkDirs{conf}/screenSetHeader.pg", |
43 | setHeader => "$webworkDirs{conf}/screenSetHeader.pg", |
| 44 | }, |
44 | }, |
| 45 | logs => { |
45 | logs => { |
| 46 | timing => "$webworkDirs{logs}/timing.log", |
46 | timing => "$webworkDirs{logs}/timing.log", |
| 47 | transaction => "$courseDirs{logs}/transaction.log", |
|
|
| 48 | }, |
47 | }, |
| 49 | ); |
48 | ); |
| 50 | |
49 | |
| 51 | %webworkURLs = ( |
50 | %webworkURLs = ( |
| 52 | root => "$webworkURLRoot", |
51 | root => "$webworkURLRoot", |
| 53 | home => "http://webwork3/", |
52 | home => "/webwork2_files/index.html", |
| 54 | htdocs => "/webwork_files", |
53 | htdocs => "/webwork2_files", |
| 55 | docs => "http://webhost.math.rochester.edu/webworkdocs/docs", |
54 | docs => "http://webhost.math.rochester.edu/webworkdocs/docs", |
| 56 | oldProf => "/webwork-old/profLogin.pl", |
55 | oldProf => "/webwork-old/profLogin.pl", |
| 57 | ); |
56 | ); |
| 58 | |
57 | |
| 59 | ################################################################################ |
58 | ################################################################################ |
| … | |
… | |
| 77 | %courseFiles = ( |
76 | %courseFiles = ( |
| 78 | environment => "$courseDirs{root}/course.conf", |
77 | environment => "$courseDirs{root}/course.conf", |
| 79 | motd => "$courseDirs{root}/motd.txt", |
78 | motd => "$courseDirs{root}/motd.txt", |
| 80 | ); |
79 | ); |
| 81 | |
80 | |
|
|
81 | # quick hack to fix transaction logging. blah. |
|
|
82 | $webworkFiles{logs}->{transaction} = "$courseDirs{logs}/transaction.log"; |
|
|
83 | $webworkFiles{logs}->{pastAnswerList} = "$courseDirs{logs}/past_answers.log"; |
|
|
84 | |
| 82 | my $courseURLRoot = "$webworkURLs{htdocs}/courses/$courseName"; |
85 | my $courseURLRoot = "$webworkURLs{htdocs}/courses/$courseName"; |
| 83 | %courseURLs = ( |
86 | %courseURLs = ( |
| 84 | root => "$courseURLRoot", |
87 | root => "$courseURLRoot", |
| 85 | html => "$courseURLRoot", |
88 | html => "$courseURLRoot", |
| 86 | html_temp => "$courseURLRoot/tmp", |
89 | html_temp => "$courseURLRoot/tmp", |
| … | |
… | |
| 91 | ################################################################################ |
94 | ################################################################################ |
| 92 | |
95 | |
| 93 | %mail = ( |
96 | %mail = ( |
| 94 | smtpServer => "mail.math.rochester.edu", |
97 | smtpServer => "mail.math.rochester.edu", |
| 95 | smtpSender => "webwork\@math.rochester.edu", |
98 | smtpSender => "webwork\@math.rochester.edu", |
|
|
99 | # 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 | #allowedRecipients => [ |
|
|
105 | # "yourname\@host.yourdomain.edu", |
|
|
106 | #], |
|
|
107 | # 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 | # 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, |
| 96 | ); |
120 | ); |
| 97 | |
121 | |
| 98 | %externalPrograms = ( |
122 | %externalPrograms = ( |
|
|
123 | mkdir => "/bin/mkdir", |
| 99 | tth => "/usr/local/bin/tth", |
124 | tth => "/usr/local/bin/tth", |
| 100 | pdflatex => "/usr/local/bin/pdflatex", |
125 | pdflatex => "/usr/local/bin/pdflatex", |
| 101 | latex => "/usr/local/bin/latex", |
126 | latex => "/usr/local/bin/latex", |
| 102 | dvipng => "/usr/local/bin/dvipng -mode ljfivemp -D600 -Q6 -x1000.5 -bgTransparent", |
127 | dvipng => "/usr/local/bin/dvipng -mode ljfivemp -D600 -Q6 -x1000.5 -bgTransparent", |
| 103 | gif2eps => "$webworkDirs{bin}/gif2eps", |
128 | gif2eps => "$webworkDirs{bin}/gif2eps", |
| … | |
… | |
| 111 | |
136 | |
| 112 | %templates = ( |
137 | %templates = ( |
| 113 | system => "$webworkDirs{conf}/barebones.template", |
138 | system => "$webworkDirs{conf}/barebones.template", |
| 114 | ); |
139 | ); |
| 115 | |
140 | |
| 116 | # $sessionKeyTimeout defines seconds of inactivity before a key expires |
|
|
| 117 | $sessionKeyTimeout = 60*30; |
|
|
| 118 | |
|
|
| 119 | # Practice users are users who's names start with $practiceUser |
|
|
| 120 | # (you can comment this out to remove practice user support) |
|
|
| 121 | $practiceUserPrefix = "practice"; |
|
|
| 122 | |
|
|
| 123 | # There is a practice user who can be logged in multiple times. He's |
|
|
| 124 | # commented out by default, though, so you don't hurt yourself. It is |
|
|
| 125 | # kindof a backdoor to the practice user system, since he doesn't have a |
|
|
| 126 | # password. Come to think of it, why do we even have this?! |
|
|
| 127 | #$debugPracticeUser = "practice666"; |
|
|
| 128 | |
|
|
| 129 | ################################################################################ |
141 | ################################################################################ |
| 130 | # Database and session |
142 | # Database and session |
| 131 | ################################################################################ |
143 | ################################################################################ |
|
|
144 | # 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!!!!!! |
| 132 | |
148 | |
|
|
149 | $dbLayout{set}->{params}->{globalUserID} = "practice1"; |
|
|
150 | $dbLayout{problem}->{params}->{globalUserID} = "practice1"; |
|
|
151 | |
|
|
152 | # 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 |
| 133 | %dbInfo = ( |
155 | %dbInfo = ( |
| 134 | auth_type => "GDBM", |
156 | auth_type => "GDBM", |
| 135 | auth_passwd_file => "$courseDirs{auth_DATA}/$courseName\_password_DB", |
157 | auth_passwd_file => "$courseDirs{auth_DATA}/$courseName\_password_DB", |
| 136 | auth_perm_file => "$courseDirs{auth_DATA}/$courseName\_permissions_DB", |
158 | auth_perm_file => "$courseDirs{auth_DATA}/$courseName\_permissions_DB", |
| 137 | auth_keys_file => "$courseDirs{auth_DATA}/keys", |
159 | auth_keys_file => "$courseDirs{auth_DATA}/keys", |
| … | |
… | |
| 140 | cldb_type => "GDBM", |
162 | cldb_type => "GDBM", |
| 141 | cldb_file => "$courseDirs{DATA}/$courseName\_classlist_DB", |
163 | cldb_file => "$courseDirs{DATA}/$courseName\_classlist_DB", |
| 142 | psvn_digits => 5, |
164 | psvn_digits => 5, |
| 143 | ); |
165 | ); |
| 144 | |
166 | |
|
|
167 | # 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 | # params = extra information needed by the schema (optional) |
|
|
173 | # note: schema and driver must have the same interface. |
|
|
174 | %dbLayout = ( |
|
|
175 | password => { |
|
|
176 | record => "WeBWorK::DB::Record::Password", |
|
|
177 | schema => "WeBWorK::DB::Schema::Auth1Hash", |
|
|
178 | driver => "WeBWorK::DB::Driver::GDBM", |
|
|
179 | source => "$courseDirs{auth_DATA}/$courseName\_password_DB", |
|
|
180 | }, |
|
|
181 | permission => { |
|
|
182 | record => "WeBWorK::DB::Record::PermissionLevel", |
|
|
183 | schema => "WeBWorK::DB::Schema::Auth1Hash", |
|
|
184 | driver => "WeBWorK::DB::Driver::GDBM", |
|
|
185 | source => "$courseDirs{auth_DATA}/$courseName\_permissions_DB", |
|
|
186 | }, |
|
|
187 | key => { |
|
|
188 | record => "WeBWorK::DB::Record::Key", |
|
|
189 | schema => "WeBWorK::DB::Schema::Auth1Hash", |
|
|
190 | driver => "WeBWorK::DB::Driver::GDBM", |
|
|
191 | source => "$courseDirs{auth_DATA}/keys", |
|
|
192 | }, |
|
|
193 | user => { |
|
|
194 | record => "WeBWorK::DB::Record::User", |
|
|
195 | schema => "WeBWorK::DB::Schema::Classlist1Hash", |
|
|
196 | driver => "WeBWorK::DB::Driver::GDBM", |
|
|
197 | source => "$courseDirs{DATA}/$courseName\_classlist_DB", |
|
|
198 | }, |
|
|
199 | set => { |
|
|
200 | record => "WeBWorK::DB::Record::Set", |
|
|
201 | schema => "WeBWorK::DB::Schema::GlobalTableEmulator", |
|
|
202 | driver => "WeBWorK::DB::Driver::Null", |
|
|
203 | source => undef, |
|
|
204 | }, |
|
|
205 | set_user => { |
|
|
206 | record => "WeBWorK::DB::Record::UserSet", |
|
|
207 | schema => "WeBWorK::DB::Schema::WW1Hash", |
|
|
208 | driver => "WeBWorK::DB::Driver::GDBM", |
|
|
209 | source => "$courseDirs{DATA}/$courseName\_webwork_DB", |
|
|
210 | params => { psvnLength => 5 }, |
|
|
211 | }, |
|
|
212 | problem => { |
|
|
213 | record => "WeBWorK::DB::Record::Problem", |
|
|
214 | schema => "WeBWorK::DB::Schema::GlobalTableEmulator", |
|
|
215 | driver => "WeBWorK::DB::Driver::Null", |
|
|
216 | source => undef, |
|
|
217 | }, |
|
|
218 | problem_user => { |
|
|
219 | record => "WeBWorK::DB::Record::UserProblem", |
|
|
220 | schema => "WeBWorK::DB::Schema::WW1Hash", |
|
|
221 | driver => "WeBWorK::DB::Driver::GDBM", |
|
|
222 | source => "$courseDirs{DATA}/$courseName\_webwork_DB", |
|
|
223 | params => { psvnLength => 5 }, |
|
|
224 | }, |
|
|
225 | ); |
|
|
226 | |
| 145 | # This lets you specify a minimum permission level needed to perform |
227 | # This lets you specify a minimum permission level needed to perform |
| 146 | # certain actions. In the current system, >=10 will allow a professor |
228 | # certain actions. In the current system, >=10 will allow a professor |
| 147 | # to perform the action, >=5 will allow a TA to, and >=0 will allow a |
229 | # to perform the action, >=5 will allow a TA to, and >=0 will allow a |
| 148 | # student to perform an action (almost never what you want). |
230 | # student to perform an action (almost never what you want). |
|
|
231 | my $ta = 5; |
|
|
232 | my $professor = 10; |
| 149 | %permissionLevels = ( |
233 | %permissionLevels = ( |
| 150 | "become_student" => 10, |
234 | "become_student" => 10, |
|
|
235 | "access_instructor_tools" => $ta, |
|
|
236 | "create_and_delete_problem_sets" => $professor, |
|
|
237 | "modify_problem_sets" => $professor, |
|
|
238 | "assign_problem_sets" => $professor, |
| 151 | ); |
239 | ); |
|
|
240 | |
|
|
241 | # $sessionKeyTimeout defines seconds of inactivity before a key expires |
|
|
242 | $sessionKeyTimeout = 60*30; |
|
|
243 | |
|
|
244 | # $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 | # 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"; |
| 152 | |
259 | |
| 153 | ################################################################################ |
260 | ################################################################################ |
| 154 | # PG translation options |
261 | # PG translation options |
| 155 | ################################################################################ |
262 | ################################################################################ |
| 156 | |
263 | |