| 1 | #!perl |
1 | #!perl |
| 2 | ################################################################################ |
2 | ################################################################################ |
| 3 | # WeBWorK mod_perl (c) 1995-2002 WeBWorK Team, Univeristy of Rochester |
3 | # WeBWorK Online Homework Delivery System |
| 4 | # $Id: global.conf.dist,v 1.27 2003-06-10 00:52:00 gage Exp $ |
4 | # Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/ |
|
|
5 | # $CVSHeader: webwork-modperl/conf/global.conf.dist,v 1.46 2004/01/05 01:06:06 sh002i Exp $ |
|
|
6 | # |
|
|
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. |
| 5 | ################################################################################ |
16 | ################################################################################ |
| 6 | |
17 | |
| 7 | # 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 |
| 8 | # 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. |
| 9 | # 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. |
| … | |
… | |
| 18 | ################################################################################ |
29 | ################################################################################ |
| 19 | # WeBWorK settings |
30 | # WeBWorK settings |
| 20 | ################################################################################ |
31 | ################################################################################ |
| 21 | |
32 | |
| 22 | %webworkDirs = ( |
33 | %webworkDirs = ( |
| 23 | root => "$webworkRoot", |
34 | root => "$webworkRoot", |
|
|
35 | DATA => "$webworkRoot/DATA", |
|
|
36 | uploadCache => "$webworkRoot/DATA/uploads", |
| 24 | bin => "$webworkRoot/bin", |
37 | bin => "$webworkRoot/bin", |
| 25 | conf => "$webworkRoot/conf", |
38 | conf => "$webworkRoot/conf", |
| 26 | courses => "$webworkRoot/courses", |
39 | courses => "$webworkRoot/courses", |
|
|
40 | htdocs => "$webworkRoot/htdocs", |
|
|
41 | htdocs_temp => "$webworkRoot/htdocs/tmp", |
|
|
42 | equationCache => "$webworkRoot/htdocs/tmp/equations", |
| 27 | lib => "$webworkRoot/lib", |
43 | lib => "$webworkRoot/lib", |
| 28 | logs => "$webworkRoot/logs", |
44 | logs => "$webworkRoot/logs", |
| 29 | macros => "$pgRoot/macros", |
45 | macros => "$pgRoot/macros", |
| 30 | tmp => "$webworkRoot/tmp", |
46 | tmp => "$webworkRoot/tmp", |
| 31 | ); |
47 | ); |
| 32 | |
48 | |
| 33 | %webworkFiles = ( |
49 | %webworkFiles = ( |
| 34 | environment => "$webworkDirs{conf}/global.conf", |
50 | environment => "$webworkDirs{conf}/global.conf", |
| 35 | hardcopySnippets => { |
51 | hardcopySnippets => { |
| 36 | preamble => "$webworkDirs{conf}/snippets/hardcopyPreamble.tex", |
52 | preamble => "$webworkDirs{conf}/snippets/hardcopyPreamble.tex", |
| 37 | setHeader => "$webworkDirs{conf}/snippets/hardcopySetHeader.pg", |
53 | setHeader => "$webworkDirs{conf}/snippets/hardcopySetHeader.pg", |
| 38 | problemDivider => "$webworkDirs{conf}/snippets/hardcopyProblemDivider.tex", |
54 | problemDivider => "$webworkDirs{conf}/snippets/hardcopyProblemDivider.tex", |
| 39 | setFooter => "$webworkDirs{conf}/snippets/hardcopySetFooter.pg", |
55 | setFooter => "$webworkDirs{conf}/snippets/hardcopySetFooter.pg", |
| 40 | setDivider => "$webworkDirs{conf}/snippets/hardcopySetDivider.tex", |
56 | setDivider => "$webworkDirs{conf}/snippets/hardcopySetDivider.tex", |
|
|
57 | userDivider => "$webworkDirs{conf}/snippets/hardcopyUserDivider.tex", |
| 41 | postamble => "$webworkDirs{conf}/snippets/hardcopyPostamble.tex", |
58 | postamble => "$webworkDirs{conf}/snippets/hardcopyPostamble.tex", |
| 42 | }, |
59 | }, |
| 43 | screenSnippets => { |
60 | screenSnippets => { |
| 44 | setHeader => "$webworkDirs{conf}/snippets/screenSetHeader.pg", |
61 | setHeader => "$webworkDirs{conf}/snippets/setHeader.pg", |
| 45 | }, |
62 | }, |
| 46 | logs => { |
63 | logs => { |
| 47 | timing => "$webworkDirs{logs}/timing.log", |
64 | timing => "$webworkDirs{logs}/timing.log", |
| 48 | }, |
65 | }, |
|
|
66 | equationCacheDB => "$webworkDirs{DATA}/equationcache", |
| 49 | ); |
67 | ); |
| 50 | |
68 | |
| 51 | %webworkURLs = ( |
69 | %webworkURLs = ( |
| 52 | root => "$webworkURLRoot", |
70 | root => "$webworkURLRoot", |
| 53 | home => "/webwork2_files/index.html", |
71 | home => "/webwork2_files/index.html", |
| 54 | htdocs => "/webwork2_files", |
72 | htdocs => "/webwork2_files", |
|
|
73 | htdocs_temp => "/webwork2_files/tmp", |
|
|
74 | equationCache => "/webwork2_files/tmp/equations", |
| 55 | docs => "http://webhost.math.rochester.edu/webworkdocs/docs", |
75 | docs => "http://webhost.math.rochester.edu/webworkdocs/docs", |
| 56 | oldProf => "/webwork-old/profLogin.pl", |
76 | oldProf => "/webwork-old/profLogin.pl", |
| 57 | ); |
77 | ); |
| 58 | |
78 | |
| 59 | ################################################################################ |
79 | ################################################################################ |
| 60 | # Default course-specific settings |
80 | # Default course-specific settings |
| 61 | ################################################################################ |
81 | ################################################################################ |
| … | |
… | |
| 70 | html_temp => "$courseRoot/html/tmp", |
90 | html_temp => "$courseRoot/html/tmp", |
| 71 | logs => "$courseRoot/logs", |
91 | logs => "$courseRoot/logs", |
| 72 | scoring => "$courseRoot/scoring", |
92 | scoring => "$courseRoot/scoring", |
| 73 | templates => "$courseRoot/templates", |
93 | templates => "$courseRoot/templates", |
| 74 | macros => "$courseRoot/templates/macros", |
94 | macros => "$courseRoot/templates/macros", |
|
|
95 | email => "$courseRoot/templates/email", |
| 75 | ); |
96 | ); |
| 76 | |
97 | |
| 77 | %courseFiles = ( |
98 | %courseFiles = ( |
| 78 | environment => "$courseDirs{root}/course.conf", |
99 | environment => "$courseDirs{root}/course.conf", |
| 79 | motd => "$courseDirs{root}/motd.txt", |
100 | motd => "$courseDirs{templates}/motd.txt", |
|
|
101 | logs => { |
|
|
102 | answer_log => "$courseDirs{logs}/answer_log", |
|
|
103 | }, |
|
|
104 | course_info => "$courseDirs{templates}/course_info.txt", |
|
|
105 | login_info => "$courseDirs{templates}/login_info.txt", |
| 80 | ); |
106 | ); |
| 81 | |
107 | |
| 82 | # quick hack to fix transaction logging. blah. |
108 | # quick hack to fix transaction logging. blah. |
| 83 | $webworkFiles{logs}->{transaction} = "$courseDirs{logs}/transaction.log"; |
109 | $webworkFiles{logs}->{transaction} = "$courseDirs{logs}/transaction.log"; |
| 84 | $webworkFiles{logs}->{pastAnswerList} = "$courseDirs{logs}/past_answers.log"; |
110 | $webworkFiles{logs}->{pastAnswerList} = "$courseDirs{logs}/past_answers.log"; |
| … | |
… | |
| 93 | ################################################################################ |
119 | ################################################################################ |
| 94 | # Other site-specific options |
120 | # Other site-specific options |
| 95 | ################################################################################ |
121 | ################################################################################ |
| 96 | |
122 | |
| 97 | %mail = ( |
123 | %mail = ( |
| 98 | smtpServer => "mail.math.rochester.edu", |
124 | smtpServer => "mail.yourdomain.edu", |
| 99 | smtpSender => "webwork\@math.rochester.edu", |
125 | smtpSender => "webwork\@yourdomain.edu", |
| 100 | # allowedRecipients defines addresses that the PG system is allowed to |
126 | # allowedRecipients defines addresses that the PG system is allowed to |
| 101 | # send mail to. this prevents subtle PG exploits. This should be set |
127 | # send mail to. this prevents subtle PG exploits. This should be set |
| 102 | # in course.conf to the addresses of professors of each course. Sending |
128 | # in course.conf to the addresses of professors of each course. Sending |
| 103 | # mail from the PG system (i.e. questionaires, essay questions) will |
129 | # mail from the PG system (i.e. questionaires, essay questions) will |
| 104 | # fail if this is not set somewhere (either here or in course.conf). |
130 | # fail if this is not set somewhere (either here or in course.conf). |
| … | |
… | |
| 115 | #], |
141 | #], |
| 116 | # feedbackVerbosity: |
142 | # feedbackVerbosity: |
| 117 | # 0: send only the feedback comment and context link |
143 | # 0: send only the feedback comment and context link |
| 118 | # 1: as in 0, plus user, set, problem, and PG data |
144 | # 1: as in 0, plus user, set, problem, and PG data |
| 119 | # 2: as in 1, plus the problem environment (debugging data) |
145 | # 2: as in 1, plus the problem environment (debugging data) |
| 120 | feedbackVerbosity => 1, |
146 | feedbackVerbosity => 1, |
|
|
147 | editor_window_rows => 15, |
|
|
148 | editor_window_columns => 100, |
| 121 | ); |
149 | ); |
| 122 | |
|
|
| 123 | |
|
|
| 124 | |
150 | |
| 125 | %externalPrograms = ( |
151 | %externalPrograms = ( |
| 126 | mkdir => "/bin/mkdir", |
152 | mkdir => "/bin/mkdir", |
| 127 | tth => "/usr/local/bin/tth", |
153 | tth => "/usr/local/bin/tth", |
| 128 | pdflatex => "/usr/local/bin/pdflatex", |
154 | pdflatex => "/usr/local/bin/pdflatex", |
| 129 | latex => "/usr/local/bin/latex", |
155 | latex => "/usr/local/bin/latex", |
| 130 | dvipng => "/usr/local/bin/dvipng -mode ljfivemp -D600 -Q6 -x1000.5 -bgTransparent", |
156 | dvipng => "/usr/local/bin/dvipng", |
| 131 | gif2eps => "$webworkDirs{bin}/gif2eps", |
157 | gif2eps => "$webworkDirs{bin}/gif2eps", |
| 132 | png2eps => "$webworkDirs{bin}/png2eps", |
158 | png2eps => "$webworkDirs{bin}/png2eps", |
| 133 | gif2png => "$webworkDirs{bin}/gif2png", |
159 | gif2png => "$webworkDirs{bin}/gif2png", |
| 134 | ); |
160 | ); |
| 135 | |
161 | |
| … | |
… | |
| 140 | %templates = ( |
166 | %templates = ( |
| 141 | system => "$webworkDirs{conf}/templates/ur.template", |
167 | system => "$webworkDirs{conf}/templates/ur.template", |
| 142 | ); |
168 | ); |
| 143 | |
169 | |
| 144 | ################################################################################ |
170 | ################################################################################ |
| 145 | # Database and session |
171 | # Database options |
| 146 | ################################################################################ |
172 | ################################################################################ |
| 147 | |
|
|
| 148 | # dbInfo records some data for the "old" WW/Classlist/Auth.pm database system |
|
|
| 149 | # {auth,wwdb,cldb}_type = database type: GDBM currently implemented |
|
|
| 150 | # {auth_passwd,auth_perm,auth_keys,wwdb,cldb}_file = path to database file |
|
|
| 151 | %dbInfo = ( |
|
|
| 152 | auth_type => "GDBM", |
|
|
| 153 | auth_passwd_file => "$courseDirs{auth_DATA}/$courseName\_password_DB", |
|
|
| 154 | auth_perm_file => "$courseDirs{auth_DATA}/$courseName\_permissions_DB", |
|
|
| 155 | auth_keys_file => "$courseDirs{auth_DATA}/keys", |
|
|
| 156 | wwdb_type => "GDBM", |
|
|
| 157 | wwdb_file => "$courseDirs{DATA}/$courseName\_webwork_DB", |
|
|
| 158 | cldb_type => "GDBM", |
|
|
| 159 | cldb_file => "$courseDirs{DATA}/$courseName\_classlist_DB", |
|
|
| 160 | psvn_digits => 5, |
|
|
| 161 | ); |
|
|
| 162 | |
173 | |
| 163 | # dbLayout records the schema and source for each table in the "new" DB.pm |
174 | # Several database are defined in the file conf/database.conf and stored in the |
| 164 | # database system. consult DB.pm for the authoritative list of tables. |
175 | # hash %dbLayouts. |
| 165 | # schema = perl module to use for access to the table |
176 | include "conf/database.conf"; |
| 166 | # driver = perl module to use for access to the data source |
|
|
| 167 | # source = location of data source (i.e. path, url, DBI spec) |
|
|
| 168 | # params = extra information needed by the schema (optional) |
|
|
| 169 | # note: schema and driver must have the same interface. |
|
|
| 170 | %dbLayout = ( |
|
|
| 171 | password => { |
|
|
| 172 | record => "WeBWorK::DB::Record::Password", |
|
|
| 173 | schema => "WeBWorK::DB::Schema::Auth1Hash", |
|
|
| 174 | driver => "WeBWorK::DB::Driver::GDBM", |
|
|
| 175 | source => "$courseDirs{auth_DATA}/$courseName\_password_DB", |
|
|
| 176 | }, |
|
|
| 177 | permission => { |
|
|
| 178 | record => "WeBWorK::DB::Record::PermissionLevel", |
|
|
| 179 | schema => "WeBWorK::DB::Schema::Auth1Hash", |
|
|
| 180 | driver => "WeBWorK::DB::Driver::GDBM", |
|
|
| 181 | source => "$courseDirs{auth_DATA}/$courseName\_permissions_DB", |
|
|
| 182 | }, |
|
|
| 183 | key => { |
|
|
| 184 | record => "WeBWorK::DB::Record::Key", |
|
|
| 185 | schema => "WeBWorK::DB::Schema::Auth1Hash", |
|
|
| 186 | driver => "WeBWorK::DB::Driver::GDBM", |
|
|
| 187 | source => "$courseDirs{auth_DATA}/keys", |
|
|
| 188 | }, |
|
|
| 189 | user => { |
|
|
| 190 | record => "WeBWorK::DB::Record::User", |
|
|
| 191 | schema => "WeBWorK::DB::Schema::Classlist1Hash", |
|
|
| 192 | driver => "WeBWorK::DB::Driver::GDBM", |
|
|
| 193 | source => "$courseDirs{DATA}/$courseName\_classlist_DB", |
|
|
| 194 | }, |
|
|
| 195 | set => { |
|
|
| 196 | record => "WeBWorK::DB::Record::Set", |
|
|
| 197 | schema => "WeBWorK::DB::Schema::GlobalTableEmulator", |
|
|
| 198 | driver => "WeBWorK::DB::Driver::Null", |
|
|
| 199 | source => undef, |
|
|
| 200 | }, |
|
|
| 201 | set_user => { |
|
|
| 202 | record => "WeBWorK::DB::Record::UserSet", |
|
|
| 203 | schema => "WeBWorK::DB::Schema::WW1Hash", |
|
|
| 204 | driver => "WeBWorK::DB::Driver::GDBM", |
|
|
| 205 | source => "$courseDirs{DATA}/$courseName\_webwork_DB", |
|
|
| 206 | params => { psvnLength => 5 }, |
|
|
| 207 | }, |
|
|
| 208 | problem => { |
|
|
| 209 | record => "WeBWorK::DB::Record::Problem", |
|
|
| 210 | schema => "WeBWorK::DB::Schema::GlobalTableEmulator", |
|
|
| 211 | driver => "WeBWorK::DB::Driver::Null", |
|
|
| 212 | source => undef, |
|
|
| 213 | }, |
|
|
| 214 | problem_user => { |
|
|
| 215 | record => "WeBWorK::DB::Record::UserProblem", |
|
|
| 216 | schema => "WeBWorK::DB::Schema::WW1Hash", |
|
|
| 217 | driver => "WeBWorK::DB::Driver::GDBM", |
|
|
| 218 | source => "$courseDirs{DATA}/$courseName\_webwork_DB", |
|
|
| 219 | params => { psvnLength => 5 }, |
|
|
| 220 | }, |
|
|
| 221 | ); |
|
|
| 222 | |
177 | |
| 223 | # If you are using the GlobalTableEmulator, you need these to be set to |
178 | # Select the default database layout. This can be overridden in the course.conf |
| 224 | # a user that will exist. Professors will probably want to override this |
179 | # file of a particular course. |
| 225 | # in their course's course.conf, using their own user name instead of "professor". |
180 | *dbLayout = $dbLayouts{sql}; |
| 226 | |
181 | |
| 227 | $dbLayout{set}->{params}->{globalUserID} = "professor"; |
182 | ################################################################################ |
| 228 | $dbLayout{problem}->{params}->{globalUserID} = "professor"; |
183 | # Authorization system |
|
|
184 | ################################################################################ |
| 229 | |
185 | |
| 230 | |
|
|
| 231 | # This lets you specify a minimum permission level needed to perform |
186 | # This lets you specify a minimum permission level needed to perform certain |
| 232 | # certain actions. In the current system, >=10 will allow a professor |
187 | # actions. In the current system, >=10 will allow a professor to perform the |
| 233 | # to perform the action, >=5 will allow a TA to, and >=0 will allow a |
188 | # action, >=5 will allow a TA to, and >=0 will allow a student to perform an |
| 234 | # student to perform an action (almost never what you want). |
189 | # action (almost never what you want). |
| 235 | my $ta = 5; |
190 | my $ta = 5; |
| 236 | my $professor = 10; |
191 | my $professor = 10; |
| 237 | %permissionLevels = ( |
192 | %permissionLevels = ( |
| 238 | "become_student" => 10, |
193 | become_student => $professor, |
| 239 | "access_instructor_tools" => $ta, |
194 | access_instructor_tools => $ta, |
| 240 | "create_and_delete_problem_sets" => $professor, |
195 | create_and_delete_problem_sets => $professor, |
| 241 | "modify_problem_sets" => $professor, |
196 | modify_problem_sets => $professor, |
| 242 | "assign_problem_sets" => $professor, |
197 | assign_problem_sets => $professor, |
|
|
198 | modify_student_data => $professor, |
|
|
199 | score_sets => $professor, |
|
|
200 | send_mail => $professor, |
|
|
201 | modify_classlist_files => $professor, |
|
|
202 | modify_set_def_files => $professor, |
| 243 | ); |
203 | ); |
|
|
204 | |
|
|
205 | ################################################################################ |
|
|
206 | # Session options |
|
|
207 | ################################################################################ |
| 244 | |
208 | |
| 245 | # $sessionKeyTimeout defines seconds of inactivity before a key expires |
209 | # $sessionKeyTimeout defines seconds of inactivity before a key expires |
| 246 | $sessionKeyTimeout = 60*30; |
210 | $sessionKeyTimeout = 60*30; |
| 247 | |
211 | |
| 248 | # $sessionKeyLength defines the length (in characters) of the session key |
212 | # $sessionKeyLength defines the length (in characters) of the session key |
| … | |
… | |
| 264 | ################################################################################ |
228 | ################################################################################ |
| 265 | # PG translation options |
229 | # PG translation options |
| 266 | ################################################################################ |
230 | ################################################################################ |
| 267 | |
231 | |
| 268 | %pg = ( |
232 | %pg = ( |
|
|
233 | # options for various renderers |
|
|
234 | renderers => { |
|
|
235 | "WeBWorK::PG::Remote" => { |
|
|
236 | proxy => "http://localhost:21000/RenderD" |
|
|
237 | } |
|
|
238 | }, |
|
|
239 | # currently selected renderer |
|
|
240 | renderer => "WeBWorK::PG::Local", |
|
|
241 | #renderer => "WeBWorK::PG::Remote", |
|
|
242 | # directories used by PG |
|
|
243 | directories => { |
|
|
244 | # directories used only by PG |
|
|
245 | lib => "$pgRoot/lib", |
|
|
246 | macros => "$pgRoot/macros", |
|
|
247 | }, |
| 269 | options => { |
248 | options => { |
| 270 | # default translation options |
249 | # default translation options |
| 271 | displayMode => "images", |
250 | displayMode => "images", |
| 272 | showOldAnswers => 1, |
251 | showOldAnswers => 1, |
| 273 | showCorrectAnswers => 0, |
252 | showCorrectAnswers => 0, |
| 274 | showHints => 0, |
253 | showHints => 0, |
| 275 | showSolutions => 0, |
254 | showSolutions => 0, |
| 276 | catchWarnings => 1, |
255 | catchWarnings => 0, # there's a global warning catcher now |
| 277 | # default grader |
256 | # default grader |
| 278 | grader => "avg_problem_grader", |
257 | grader => "avg_problem_grader", |
| 279 | }, |
258 | }, |
| 280 | # this will be customized in the course.conf file |
259 | # this will be customized in the course.conf file |
| 281 | specialPGEnvironmentVars => { |
260 | specialPGEnvironmentVars => { |
| 282 | PRINT_FILE_NAMES_FOR => ['gage','apizer','voloshin','lr003k','professor'], |
261 | PRINT_FILE_NAMES_FOR => [ qw(professor) ], |
| 283 | CAPA_Tools => "$courseDirs{macros}/CAPA_Tools/", |
262 | CAPA_Tools => "$courseDirs{macros}/CAPA_Tools/", |
| 284 | CAPA_MCTools => "$courseDirs{macros}/CAPA_MCTools/", |
263 | CAPA_MCTools => "$courseDirs{macros}/CAPA_MCTools/", |
| 285 | CAPA_Graphics_URL => "$courseDirs{html}/CAPA_Graphics/", |
264 | CAPA_Graphics_URL => "$courseDirs{html}/CAPA_Graphics/", |
| 286 | CAPA_GraphicsDirectory => "$courseDirs{html}CAPA_Graphics/", |
265 | CAPA_GraphicsDirectory => "$courseDirs{html}CAPA_Graphics/", |
| 287 | }, |
266 | }, |
| 288 | # modules lists module names and the packages each contains |
267 | # modules lists module names and the packages each contains |
| 289 | modules => [ |
268 | modules => [ |
| 290 | [qw(DynaLoader)], |
269 | [qw(DynaLoader)], |
| 291 | [qw(Exporter)], |
270 | [qw(Exporter)], |
| 292 | [qw(GD)], |
271 | [qw(GD)], |