| 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.28 2003-06-10 16:27:26 malsyned Exp $ |
4 | # $Id: global.conf.dist,v 1.36 2003-06-21 02:34:10 gage 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. |
| … | |
… | |
| 24 | bin => "$webworkRoot/bin", |
24 | bin => "$webworkRoot/bin", |
| 25 | conf => "$webworkRoot/conf", |
25 | conf => "$webworkRoot/conf", |
| 26 | courses => "$webworkRoot/courses", |
26 | courses => "$webworkRoot/courses", |
| 27 | lib => "$webworkRoot/lib", |
27 | lib => "$webworkRoot/lib", |
| 28 | logs => "$webworkRoot/logs", |
28 | logs => "$webworkRoot/logs", |
| 29 | macros => "$pgRoot/macros", |
|
|
| 30 | tmp => "$webworkRoot/tmp", |
29 | tmp => "$webworkRoot/tmp", |
| 31 | ); |
30 | ); |
| 32 | |
31 | |
| 33 | %webworkFiles = ( |
32 | %webworkFiles = ( |
| 34 | environment => "$webworkDirs{conf}/global.conf", |
33 | environment => "$webworkDirs{conf}/global.conf", |
| … | |
… | |
| 36 | preamble => "$webworkDirs{conf}/snippets/hardcopyPreamble.tex", |
35 | preamble => "$webworkDirs{conf}/snippets/hardcopyPreamble.tex", |
| 37 | setHeader => "$webworkDirs{conf}/snippets/hardcopySetHeader.pg", |
36 | setHeader => "$webworkDirs{conf}/snippets/hardcopySetHeader.pg", |
| 38 | problemDivider => "$webworkDirs{conf}/snippets/hardcopyProblemDivider.tex", |
37 | problemDivider => "$webworkDirs{conf}/snippets/hardcopyProblemDivider.tex", |
| 39 | setFooter => "$webworkDirs{conf}/snippets/hardcopySetFooter.pg", |
38 | setFooter => "$webworkDirs{conf}/snippets/hardcopySetFooter.pg", |
| 40 | setDivider => "$webworkDirs{conf}/snippets/hardcopySetDivider.tex", |
39 | setDivider => "$webworkDirs{conf}/snippets/hardcopySetDivider.tex", |
|
|
40 | userDivider => "$webworkDirs{conf}/snippets/hardcopyUserDivider.tex", |
| 41 | postamble => "$webworkDirs{conf}/snippets/hardcopyPostamble.tex", |
41 | postamble => "$webworkDirs{conf}/snippets/hardcopyPostamble.tex", |
| 42 | }, |
42 | }, |
| 43 | screenSnippets => { |
43 | screenSnippets => { |
| 44 | setHeader => "$webworkDirs{conf}/snippets/screenSetHeader.pg", |
44 | setHeader => "$webworkDirs{conf}/snippets/screenSetHeader.pg", |
| 45 | }, |
45 | }, |
| … | |
… | |
| 118 | # 1: as in 0, plus user, set, problem, and PG data |
118 | # 1: as in 0, plus user, set, problem, and PG data |
| 119 | # 2: as in 1, plus the problem environment (debugging data) |
119 | # 2: as in 1, plus the problem environment (debugging data) |
| 120 | feedbackVerbosity => 1, |
120 | feedbackVerbosity => 1, |
| 121 | ); |
121 | ); |
| 122 | |
122 | |
| 123 | |
|
|
| 124 | |
|
|
| 125 | %externalPrograms = ( |
123 | %externalPrograms = ( |
| 126 | mkdir => "/bin/mkdir", |
124 | mkdir => "/bin/mkdir", |
| 127 | tth => "/usr/local/bin/tth", |
125 | tth => "/usr/local/bin/tth", |
| 128 | pdflatex => "/usr/local/bin/pdflatex", |
126 | pdflatex => "/usr/local/bin/pdflatex", |
| 129 | latex => "/usr/local/bin/latex", |
127 | latex => "/usr/local/bin/latex", |
| 130 | dvipng => "/usr/local/bin/dvipng -mode ljfivemp -D600 -Q6 -x1000.5 -bgTransparent", |
128 | #dvipng => "/usr/local/bin/dvipng -mode ljfivemp -D600 -Q6 -x1000.5 -bgTransparent", |
|
|
129 | dvipng => "/usr/local/bin/dvipng", |
| 131 | gif2eps => "$webworkDirs{bin}/gif2eps", |
130 | gif2eps => "$webworkDirs{bin}/gif2eps", |
| 132 | png2eps => "$webworkDirs{bin}/png2eps", |
131 | png2eps => "$webworkDirs{bin}/png2eps", |
| 133 | gif2png => "$webworkDirs{bin}/gif2png", |
132 | gif2png => "$webworkDirs{bin}/gif2png", |
| 134 | ); |
133 | ); |
| 135 | |
134 | |
| … | |
… | |
| 140 | %templates = ( |
139 | %templates = ( |
| 141 | system => "$webworkDirs{conf}/templates/ur.template", |
140 | system => "$webworkDirs{conf}/templates/ur.template", |
| 142 | ); |
141 | ); |
| 143 | |
142 | |
| 144 | ################################################################################ |
143 | ################################################################################ |
| 145 | # Database and session |
144 | # Database options |
| 146 | ################################################################################ |
145 | ################################################################################ |
| 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 | |
146 | |
| 163 | # dbLayout records the schema and source for each table in the "new" DB.pm |
147 | # Several database layouts are defined in separate environment files. Select the |
| 164 | # database system. consult DB.pm for the authoritative list of tables. |
148 | # one which should be used by all courses by default, and include it. This can |
| 165 | # schema = perl module to use for access to the table |
149 | # be overridden by including a difference environment file in the course.conf of |
| 166 | # driver = perl module to use for access to the data source |
150 | # a particular course. |
| 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 | |
151 | |
| 223 | # If you are using the GlobalTableEmulator, you need these to be set to |
152 | # Include sql.conf to specify a database layout for use with an SQL server. |
| 224 | # a user that will exist. Professors will probably want to override this |
153 | #include "conf/sql.conf"; |
| 225 | # in their course's course.conf, using their own user name instead of "professor". |
|
|
| 226 | |
154 | |
| 227 | $dbLayout{set}->{params}->{globalUserID} = "professor"; |
155 | # Include gdbm.conf to specify a database layout for WeBWorK 1.x compatible GDBM |
| 228 | $dbLayout{problem}->{params}->{globalUserID} = "professor"; |
156 | # databases. Use this layout if you wish to share courses between WeBWorK 1.x |
|
|
157 | # and WeBWorK 2. |
|
|
158 | include "conf/gdbm.conf"; |
| 229 | |
159 | |
|
|
160 | # Please read the documentation in the file that you chose to include, as there |
|
|
161 | # are layout-specific options that must be configured. |
| 230 | |
162 | |
|
|
163 | ################################################################################ |
|
|
164 | # Authorization system |
|
|
165 | ################################################################################ |
|
|
166 | |
| 231 | # This lets you specify a minimum permission level needed to perform |
167 | # This lets you specify a minimum permission level needed to perform certain |
| 232 | # certain actions. In the current system, >=10 will allow a professor |
168 | # 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 |
169 | # 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). |
170 | # action (almost never what you want). |
| 235 | my $ta = 5; |
171 | my $ta = 5; |
| 236 | my $professor = 10; |
172 | my $professor = 10; |
| 237 | %permissionLevels = ( |
173 | %permissionLevels = ( |
| 238 | "become_student" => $professor, |
174 | become_student => $professor, |
| 239 | "access_instructor_tools" => $ta, |
175 | access_instructor_tools => $ta, |
| 240 | "create_and_delete_problem_sets" => $professor, |
176 | create_and_delete_problem_sets => $professor, |
| 241 | "modify_problem_sets" => $professor, |
177 | modify_problem_sets => $professor, |
| 242 | "assign_problem_sets" => $professor, |
178 | assign_problem_sets => $professor, |
|
|
179 | modify_student_data => $professor, |
| 243 | ); |
180 | ); |
|
|
181 | |
|
|
182 | ################################################################################ |
|
|
183 | # Session options |
|
|
184 | ################################################################################ |
| 244 | |
185 | |
| 245 | # $sessionKeyTimeout defines seconds of inactivity before a key expires |
186 | # $sessionKeyTimeout defines seconds of inactivity before a key expires |
| 246 | $sessionKeyTimeout = 60*30; |
187 | $sessionKeyTimeout = 60*30; |
| 247 | |
188 | |
| 248 | # $sessionKeyLength defines the length (in characters) of the session key |
189 | # $sessionKeyLength defines the length (in characters) of the session key |
| … | |
… | |
| 264 | ################################################################################ |
205 | ################################################################################ |
| 265 | # PG translation options |
206 | # PG translation options |
| 266 | ################################################################################ |
207 | ################################################################################ |
| 267 | |
208 | |
| 268 | %pg = ( |
209 | %pg = ( |
|
|
210 | # options for various renderers |
|
|
211 | renderers => { |
|
|
212 | "WeBWorK::PG::Remote" => { |
|
|
213 | uri => "http://localhost:8089/RPC2" |
|
|
214 | } |
|
|
215 | }, |
|
|
216 | # currently selected renderer |
|
|
217 | renderer => "WeBWorK::PG::Local", |
|
|
218 | # directories used by PG |
|
|
219 | directories => { |
|
|
220 | lib => "$pgRoot/lib", |
|
|
221 | macros => "$pgRoot/macros", |
|
|
222 | }, |
| 269 | options => { |
223 | options => { |
| 270 | # default translation options |
224 | # default translation options |
| 271 | displayMode => "images", |
225 | displayMode => "images", |
| 272 | showOldAnswers => 1, |
226 | showOldAnswers => 1, |
| 273 | showCorrectAnswers => 0, |
227 | showCorrectAnswers => 0, |
| 274 | showHints => 0, |
228 | showHints => 0, |
| 275 | showSolutions => 0, |
229 | showSolutions => 0, |
| 276 | catchWarnings => 1, |
230 | catchWarnings => 0, # there's a global warning catcher now |
| 277 | # default grader |
231 | # default grader |
| 278 | grader => "avg_problem_grader", |
232 | grader => "avg_problem_grader", |
| 279 | }, |
233 | }, |
| 280 | # this will be customized in the course.conf file |
234 | # this will be customized in the course.conf file |
| 281 | specialPGEnvironmentVars => { |
235 | specialPGEnvironmentVars => { |
| 282 | PRINT_FILE_NAMES_FOR => ['gage','apizer','voloshin','lr003k','professor'], |
236 | PRINT_FILE_NAMES_FOR => [ qw(gage apizer voloshin lr003k professor) ], |
| 283 | CAPA_Tools => "$courseDirs{macros}/CAPA_Tools/", |
237 | CAPA_Tools => "$courseDirs{macros}/CAPA_Tools/", |
| 284 | CAPA_MCTools => "$courseDirs{macros}/CAPA_MCTools/", |
238 | CAPA_MCTools => "$courseDirs{macros}/CAPA_MCTools/", |
| 285 | CAPA_Graphics_URL => "$courseDirs{html}/CAPA_Graphics/", |
239 | CAPA_Graphics_URL => "$courseDirs{html}/CAPA_Graphics/", |
| 286 | CAPA_GraphicsDirectory => "$courseDirs{html}CAPA_Graphics/", |
240 | CAPA_GraphicsDirectory => "$courseDirs{html}CAPA_Graphics/", |
| 287 | }, |
241 | }, |
| 288 | # modules lists module names and the packages each contains |
242 | # modules lists module names and the packages each contains |
| 289 | modules => [ |
243 | modules => [ |
| 290 | [qw(DynaLoader)], |
244 | [qw(DynaLoader)], |
| 291 | [qw(Exporter)], |
245 | [qw(Exporter)], |