| 1 | #!perl |
1 | #!perl |
| 2 | ################################################################################ |
2 | ################################################################################ |
| 3 | # WeBWorK Online Homework Delivery System |
3 | # WeBWorK Online Homework Delivery System |
| 4 | # Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/ |
4 | # Copyright © 2000-2006 The WeBWorK Project, http://openwebwork.sf.net/ |
| 5 | # $CVSHeader: webwork-modperl/conf/global.conf.dist,v 1.134 2005/08/28 20:54:50 jj Exp $ |
5 | # $CVSHeader: webwork2/conf/global.conf.dist,v 1.170 2006/07/05 18:24:43 sh002i Exp $ |
| 6 | # |
6 | # |
| 7 | # This program is free software; you can redistribute it and/or modify it under |
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 |
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 |
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. |
10 | # version, or (b) the "Artistic License" which comes with this package. |
| … | |
… | |
| 42 | |
42 | |
| 43 | # URL and path to courses directory. |
43 | # URL and path to courses directory. |
| 44 | $webwork_courses_url = "/webwork2_course_files"; |
44 | $webwork_courses_url = "/webwork2_course_files"; |
| 45 | $webwork_courses_dir = "$webwork_dir/courses"; |
45 | $webwork_courses_dir = "$webwork_dir/courses"; |
| 46 | |
46 | |
|
|
47 | # machine domain name (#FIXME can we get this automatically???) (needed to find applets) |
|
|
48 | $domainName = "devel.webwork.rochester.edu:8002"; |
|
|
49 | |
|
|
50 | |
| 47 | ################################################################################ |
51 | ################################################################################ |
| 48 | # Paths to external programs |
52 | # Paths to external programs |
| 49 | ################################################################################ |
53 | ################################################################################ |
| 50 | |
54 | |
|
|
55 | # system utilties |
| 51 | $externalPrograms{mkdir} = "/bin/mkdir"; |
56 | $externalPrograms{mkdir} = "/bin/mkdir"; |
| 52 | $externalPrograms{mv} = "/bin/mv"; |
57 | $externalPrograms{mv} = "/bin/mv"; |
| 53 | $externalPrograms{mysql} = "/usr/bin/mysql"; |
58 | $externalPrograms{mysql} = "/usr/bin/mysql"; |
|
|
59 | $externalPrograms{tar} = "/usr/bin/tar"; |
| 54 | |
60 | |
|
|
61 | # equation rendering/hardcopy utiltiies |
| 55 | $externalPrograms{latex} = "/usr/bin/latex"; |
62 | $externalPrograms{latex} = "/usr/bin/latex"; |
| 56 | $externalPrograms{pdflatex} = "/usr/bin/pdflatex --shell-escape"; # allows pdflatex to handle .eps files |
63 | $externalPrograms{pdflatex} = "/usr/bin/pdflatex --shell-escape"; # --shell-escape allows pdflatex to handle .eps files |
| 57 | $externalPrograms{dvipng} = "/usr/bin/dvipng"; |
64 | $externalPrograms{dvipng} = "/usr/bin/dvipng"; |
| 58 | $externalPrograms{tth} = "/usr/bin/tth"; |
65 | $externalPrograms{tth} = "/usr/bin/tth"; |
| 59 | |
66 | |
| 60 | $externalPrograms{tar} = "/usr/bin/tar"; |
|
|
| 61 | |
|
|
| 62 | # Basic image manipulation utilities |
67 | # NetPBM - basic image manipulation utilities |
| 63 | |
|
|
| 64 | #################################################### |
|
|
| 65 | # Most sites only need to configure the first line |
68 | # most sites only need to configure $netpbm_prefix. |
| 66 | #################################################### |
|
|
| 67 | my $netpbm_prefix = "/usr/bin"; |
69 | my $netpbm_prefix = "/usr/bin"; |
| 68 | $externalPrograms{giftopnm} = "$netpbm_prefix/giftopnm"; |
70 | $externalPrograms{giftopnm} = "$netpbm_prefix/giftopnm"; |
| 69 | $externalPrograms{ppmtopgm} = "$netpbm_prefix/ppmtopgm"; |
71 | $externalPrograms{ppmtopgm} = "$netpbm_prefix/ppmtopgm"; |
| 70 | $externalPrograms{pnmtops} = "$netpbm_prefix/pnmtops"; |
72 | $externalPrograms{pnmtops} = "$netpbm_prefix/pnmtops"; |
| 71 | $externalPrograms{pnmtopng} = "$netpbm_prefix/pnmtopng"; |
73 | $externalPrograms{pnmtopng} = "$netpbm_prefix/pnmtopng"; |
| 72 | $externalPrograms{pngtopnm} = "$netpbm_prefix/pngtopnm"; |
74 | $externalPrograms{pngtopnm} = "$netpbm_prefix/pngtopnm"; |
| 73 | |
75 | |
| 74 | # The following lines are the external scripts gif2eps, etc. |
76 | # url checker |
| 75 | # The source file is input with cat, and the output is redirected to |
77 | $externalPrograms{checkurl} = "/usr/local/bin/lwp-request -mHEAD "; # or "/usr/local/bin/w3c -head " |
| 76 | # the desired file. |
|
|
| 77 | |
78 | |
|
|
79 | |
|
|
80 | # image conversions utiltiies |
|
|
81 | # the source file is given on stdin, and the output expected on stdout. |
|
|
82 | # |
|
|
83 | # Note on conversions pipelines: |
|
|
84 | # we used to use `pnmdepth 1' instead of ppmtopgm as it creates a |
|
|
85 | # monochrome image (1 bit) rather than a greyscale image (8 bits). |
|
|
86 | # However, this was causing improper display of some sort in PDFs. |
| 78 | $externalPrograms{gif2eps} = "$externalPrograms{giftopnm} | $externalPrograms{ppmtopgm}| $externalPrograms{pnmtops} -noturn 2>/dev/null"; |
87 | $externalPrograms{gif2eps} = "$externalPrograms{giftopnm} | $externalPrograms{ppmtopgm} | $externalPrograms{pnmtops} -noturn 2>/dev/null"; |
| 79 | $externalPrograms{png2eps} = "$externalPrograms{pngtopnm} | $externalPrograms{ppmtopgm} | $externalPrograms{pnmtops} -noturn 2>/dev/null"; |
88 | $externalPrograms{png2eps} = "$externalPrograms{pngtopnm} | $externalPrograms{ppmtopgm} | $externalPrograms{pnmtops} -noturn 2>/dev/null"; |
| 80 | $externalPrograms{gif2png} = "$externalPrograms{giftopnm} | $externalPrograms{pnmtopng}"; |
89 | $externalPrograms{gif2png} = "$externalPrograms{giftopnm} | $externalPrograms{pnmtopng}"; |
| 81 | |
90 | |
| 82 | # Note on these conversions: |
|
|
| 83 | # we used to use `pnmdepth 1' instead of ppmtopgm as it creates a |
|
|
| 84 | # monochrome image (1 bit) rather than a greyscale image (8 bits). |
|
|
| 85 | # However, this was causing improper display of some sort in PDFs. |
|
|
| 86 | |
|
|
| 87 | |
|
|
| 88 | |
|
|
| 89 | |
|
|
| 90 | ################################################################################ |
91 | ################################################################################ |
| 91 | # Mail settings |
92 | # Mail settings |
| 92 | ################################################################################ |
93 | ################################################################################ |
| 93 | |
94 | |
| 94 | # Mail sent by the PG system and the mail merge and feedback modules will be |
95 | # Mail sent by the PG system and the mail merge and feedback modules will be |
| 95 | # sent via this SMTP server. |
96 | # sent via this SMTP server. |
| 96 | $mail{smtpServer} = 'mail.rochester.edu'; |
97 | $mail{smtpServer} = 'mail.yourschool.edu'; |
| 97 | |
98 | |
| 98 | # When connecting to the above server, WeBWorK will send this address in the |
99 | # When connecting to the above server, WeBWorK will send this address in the |
| 99 | # MAIL FROM command. This has nothing to do with the "From" address on the mail |
100 | # MAIL FROM command. This has nothing to do with the "From" address on the mail |
| 100 | # message. It can really be anything, but some mail servers require it contain |
101 | # message. It can really be anything, but some mail servers require it contain |
| 101 | # a valid mail domain, or at least be well-formed. |
102 | # a valid mail domain, or at least be well-formed. |
| 102 | $mail{smtpSender} = 'webwork@yourserver.yourschool.edu'; |
103 | $mail{smtpSender} = 'webwork@yourserver.yourschool.edu'; |
| 103 | |
104 | |
| 104 | # AllowedRecipients defines addresses that the PG system is allowed to send mail |
105 | # AllowedRecipients defines addresses that the PG system is allowed to send mail |
| 105 | # to. this prevents subtle PG exploits. This should be set in course.conf to the |
106 | # to. this prevents subtle PG exploits. This should be set in course.conf to the |
| 106 | # addresses of professors of each course. Sending mail from the PG system (i.e. |
107 | # addresses of professors of each course. Sending mail from the PG system (i.e. |
| 107 | # questionaires, essay questions) will fail if this is not set somewhere (either |
108 | # questionaires, essay questions) will fail if this is not set somewhere (either |
| 108 | # here or in course.conf). |
109 | # here or in course.conf). |
| 109 | $mail{allowedRecipients} = [ |
110 | $mail{allowedRecipients} = [ |
| 110 | #'prof1@yourserver.yourdomain.edu', |
111 | #'prof1@yourserver.yourdomain.edu', |
| 111 | #'prof2@yourserver.yourdomain.edu', |
112 | #'prof2@yourserver.yourdomain.edu', |
| 112 | ]; |
113 | ]; |
| 113 | |
114 | |
| 114 | # If defined, feedbackRecipients overrides the list of recipients for feedback |
115 | # By default, feeback is sent to all users who have permission to |
| 115 | # email. It's appropriate to set this in the course.conf for specific courses, |
116 | # receive_feedback. If this list is non-empty, feedback is also sent to the |
| 116 | # but probably not in global.conf. if not defined, mail is sent to all |
117 | # addresses specified here. |
| 117 | # professors and TAs for a given course |
118 | # |
|
|
119 | # * If you want to disable feedback altogether, leave this empty and set |
|
|
120 | # submit_feeback => $nobody in %permissionLevels below. This will cause the |
|
|
121 | # feedback button to go away as well. |
|
|
122 | # |
|
|
123 | # * If you want to send email ONLY to addresses in this list, set |
|
|
124 | # receive_feedback => $nobody in %permissionLevels below. |
|
|
125 | # |
|
|
126 | # It's often useful to set this in the course.conf to change the behavior of |
|
|
127 | # feedback for a specific course. |
|
|
128 | # |
|
|
129 | # Items in this list may be bare addresses, or RFC822 mailboxes, like: |
|
|
130 | # 'Joe User <joe.user@example.com>' |
|
|
131 | # The advantage of this form is that the resulting email will include the name |
|
|
132 | # of the recipient in the "To" field of the email. |
|
|
133 | # |
| 118 | #$mail{feedbackRecipients} = [ |
134 | $mail{feedbackRecipients} = [ |
| 119 | # 'prof1@yourserver.yourdomain.edu', |
135 | #'prof1@yourserver.yourdomain.edu', |
| 120 | # 'prof2@yourserver.yourdomain.edu', |
136 | #'prof2@yourserver.yourdomain.edu', |
| 121 | #]; |
137 | ]; |
| 122 | |
138 | |
|
|
139 | # Feedback subject line -- the following escape sequences are recognized: |
|
|
140 | # |
|
|
141 | # %c = course ID |
|
|
142 | # %u = user ID |
|
|
143 | # %s = set ID |
|
|
144 | # %p = problem ID |
|
|
145 | # %x = section |
|
|
146 | # %r = recitation |
|
|
147 | # %% = literal percent sign |
|
|
148 | # |
|
|
149 | $mail{feedbackSubjectFormat} = "[WWfeedback] course:%c user:%u set:%s prob:%p sec:%x rec:%r"; |
|
|
150 | |
| 123 | # feedbackVerbosity: |
151 | # feedbackVerbosity: |
| 124 | # 0: send only the feedback comment and context link |
152 | # 0: send only the feedback comment and context link |
| 125 | # 1: as in 0, plus user, set, problem, and PG data |
153 | # 1: as in 0, plus user, set, problem, and PG data |
| 126 | # 2: as in 1, plus the problem environment (debugging data) |
154 | # 2: as in 1, plus the problem environment (debugging data) |
| 127 | $mail{feedbackVerbosity} = 1; |
155 | $mail{feedbackVerbosity} = 1; |
| 128 | |
156 | |
| 129 | # Defines the size of the Mail Merge editor window |
157 | # Defines the size of the Mail Merge editor window |
| 130 | # FIXME: should this be here? it's UI, not mail |
158 | # FIXME: should this be here? it's UI, not mail |
| 131 | # FIXME: replace this with the auto-size method that TWiki uses |
159 | # FIXME: replace this with the auto-size method that TWiki uses |
| 132 | $mail{editor_window_rows} = 15; |
160 | $mail{editor_window_rows} = 15; |
| 133 | $mail{editor_window_columns} = 100; |
161 | $mail{editor_window_columns} = 100; |
| … | |
… | |
| 149 | $webworkDirs{bin} = "$webworkDirs{root}/bin"; |
177 | $webworkDirs{bin} = "$webworkDirs{root}/bin"; |
| 150 | |
178 | |
| 151 | # Location of configuration files, templates, snippets, etc. |
179 | # Location of configuration files, templates, snippets, etc. |
| 152 | $webworkDirs{conf} = "$webworkDirs{root}/conf"; |
180 | $webworkDirs{conf} = "$webworkDirs{root}/conf"; |
| 153 | |
181 | |
|
|
182 | # Location of theme templates. |
|
|
183 | $webworkDirs{templates} = "$webworkDirs{conf}/templates"; |
|
|
184 | |
| 154 | # Location of course directories. |
185 | # Location of course directories. |
| 155 | $webworkDirs{courses} = "$webwork_courses_dir" || "$webworkDirs{root}/courses"; |
186 | $webworkDirs{courses} = "$webwork_courses_dir" || "$webworkDirs{root}/courses"; |
| 156 | |
187 | |
| 157 | # Contains log files. |
188 | # Contains log files. |
| 158 | $webworkDirs{logs} = "$webworkDirs{root}/logs"; |
189 | $webworkDirs{logs} = "$webworkDirs{root}/logs"; |
| … | |
… | |
| 214 | |
245 | |
| 215 | # The root directory of the current course. (The ID of the current course is |
246 | # The root directory of the current course. (The ID of the current course is |
| 216 | # available in $courseName.) |
247 | # available in $courseName.) |
| 217 | $courseDirs{root} = "$webworkDirs{courses}/$courseName"; |
248 | $courseDirs{root} = "$webworkDirs{courses}/$courseName"; |
| 218 | |
249 | |
| 219 | # Location of course-specific data files, such as WW1 (GDBM) database files. |
250 | # Location of course-specific data files. |
| 220 | $courseDirs{DATA} = "$courseDirs{root}/DATA"; |
251 | $courseDirs{DATA} = "$courseDirs{root}/DATA"; |
| 221 | |
|
|
| 222 | # Location of authentication data files when using a WW1 (GDBM) database. |
|
|
| 223 | $courseDirs{auth_DATA} = "$courseDirs{DATA}/.auth"; |
|
|
| 224 | |
252 | |
| 225 | # Location of course HTML files, passed to PG. |
253 | # Location of course HTML files, passed to PG. |
| 226 | $courseDirs{html} = "$courseDirs{root}/html"; |
254 | $courseDirs{html} = "$courseDirs{root}/html"; |
| 227 | $courseURLs{html} = "$webwork_courses_url/$courseName"; |
255 | $courseURLs{html} = "$webwork_courses_url/$courseName"; |
| 228 | |
256 | |
| … | |
… | |
| 246 | # Location of course-specific macro files. |
274 | # Location of course-specific macro files. |
| 247 | $courseDirs{macros} = "$courseDirs{templates}/macros"; |
275 | $courseDirs{macros} = "$courseDirs{templates}/macros"; |
| 248 | |
276 | |
| 249 | # Location of mail-merge templates. |
277 | # Location of mail-merge templates. |
| 250 | $courseDirs{email} = "$courseDirs{templates}/email"; |
278 | $courseDirs{email} = "$courseDirs{templates}/email"; |
|
|
279 | |
|
|
280 | # Location of temporary editing files. |
|
|
281 | $courseDirs{tmpEditFileDir} = "$courseDirs{templates}/tmpEdit"; |
| 251 | |
282 | |
| 252 | ################################################################################ |
283 | ################################################################################ |
| 253 | # System-wide files |
284 | # System-wide files |
| 254 | ################################################################################ |
285 | ################################################################################ |
| 255 | |
286 | |
| … | |
… | |
| 295 | # A PG template for creation of new problems. |
326 | # A PG template for creation of new problems. |
| 296 | $webworkFiles{screenSnippets}{blankProblem} = "$webworkDirs{conf}/snippets/blankProblem.pg"; # screenSetHeader.pg" |
327 | $webworkFiles{screenSnippets}{blankProblem} = "$webworkDirs{conf}/snippets/blankProblem.pg"; # screenSetHeader.pg" |
| 297 | |
328 | |
| 298 | # A site info "message of the day" file |
329 | # A site info "message of the day" file |
| 299 | $webworkFiles{site_info} = "$webworkDirs{htdocs}/site_info.txt"; |
330 | $webworkFiles{site_info} = "$webworkDirs{htdocs}/site_info.txt"; |
|
|
331 | |
| 300 | ################################################################################ |
332 | ################################################################################ |
| 301 | # Course-specific files |
333 | # Course-specific files |
| 302 | ################################################################################ |
334 | ################################################################################ |
| 303 | |
335 | |
| 304 | # The course configuration file. |
336 | # The course configuration file. |
| 305 | $courseFiles{environment} = "$courseDirs{root}/course.conf"; |
337 | $courseFiles{environment} = "$courseDirs{root}/course.conf"; |
|
|
338 | |
|
|
339 | # The course simple configuration file (holds web-based configuratoin). |
|
|
340 | $courseFiles{simpleConfig} = "$courseDirs{root}/simple.conf"; |
| 306 | |
341 | |
| 307 | # File contents are displayed after login, on the problem sets page. Path given |
342 | # File contents are displayed after login, on the problem sets page. Path given |
| 308 | # here is relative to the templates directory. |
343 | # here is relative to the templates directory. |
| 309 | $courseFiles{course_info} = "course_info.txt"; |
344 | $courseFiles{course_info} = "course_info.txt"; |
| 310 | |
345 | |
| … | |
… | |
| 335 | # osuLibrary => "Ohio State", |
370 | # osuLibrary => "Ohio State", |
| 336 | # capaLibrary => "CAPA", |
371 | # capaLibrary => "CAPA", |
| 337 | }; |
372 | }; |
| 338 | |
373 | |
| 339 | ################################################################################ |
374 | ################################################################################ |
| 340 | # Database options (WWDBv3) |
375 | # Database options |
| 341 | ################################################################################ |
376 | ################################################################################ |
| 342 | |
377 | |
| 343 | # The four arguments passed to the DBI::connect() method. See the DBI manual for |
378 | # these variables are used by database.conf. we define them here so that editing |
| 344 | # more information. |
379 | # database.conf isn't necessary. |
| 345 | $wwdbv3_settings{dsn} = "dbi:mysql:wwdbv3"; |
380 | $database_dsn = "dbi:mysql:webwork"; |
| 346 | $wwdbv3_settings{user} = "wwdbv3"; |
381 | $database_username = "webworkWrite"; |
| 347 | $wwdbv3_settings{pass} = "xyzzy"; |
382 | $database_password = ""; |
| 348 | $wwdbv3_settings{attr} = {}; |
383 | $database_debug = 0; |
| 349 | |
384 | |
| 350 | # WWDBv3 needs a lock file to prevent concurrent database upgrades. The file |
385 | # Variables for sql_moodle database layout. |
| 351 | # will be locked with flock(). |
386 | $moodle_dsn = "dbi:mysql:moodle"; |
| 352 | $wwdbv3_settings{upgrade_lock} = "$webworkDirs{tmp}/wwdbv3_upgrade.lock"; |
387 | $moodle_dsn = "dbi:mysql:moodle_sam"; |
| 353 | |
388 | $moodle_table_prefix = "mdl_"; |
| 354 | ################################################################################ |
389 | $moodle_username = $database_username; |
| 355 | # Database options (WWDBv2) |
390 | $moodle_password = $database_password; |
| 356 | ################################################################################ |
|
|
| 357 | |
391 | |
| 358 | # Several database are defined in the file conf/database.conf and stored in the |
392 | # Several database are defined in the file conf/database.conf and stored in the |
| 359 | # hash %dbLayouts. |
393 | # hash %dbLayouts. |
| 360 | include "conf/database.conf"; |
394 | include "conf/database.conf"; |
| 361 | |
395 | |
| 362 | # Select the default database layout. This can be overridden in the course.conf |
396 | # Select the default database layout. This can be overridden in the course.conf |
| 363 | # file of a particular course. If you choose "gdbm", WeBWorK will be able to |
397 | # file of a particular course. The only database layout supported in WW 2.1.4 |
| 364 | # use courses from WeBWorK 1 without first adding course.conf files to them. |
398 | # and up is "sql_single". |
| 365 | # However, the recommended database layout for new courses is "sql_single". This |
399 | $dbLayoutName = "sql_single"; |
| 366 | # can be set when creating a course. |
|
|
| 367 | $dbLayoutName = "sql_single"; # or "gdbm" or "sql" |
|
|
| 368 | |
400 | |
| 369 | # This sets the symbol "dbLayout" as an alias for the selected database layout. |
401 | # This sets the symbol "dbLayout" as an alias for the selected database layout. |
| 370 | *dbLayout = $dbLayouts{$dbLayoutName}; |
402 | *dbLayout = $dbLayouts{$dbLayoutName}; |
| 371 | |
403 | |
| 372 | ################################################################################ |
404 | ################################################################################ |
| … | |
… | |
| 424 | |
456 | |
| 425 | ################################################################################ |
457 | ################################################################################ |
| 426 | # Site defaults (FIXME: what other things could be "site defaults"?) |
458 | # Site defaults (FIXME: what other things could be "site defaults"?) |
| 427 | ################################################################################ |
459 | ################################################################################ |
| 428 | |
460 | |
| 429 | # Status strings -- lists valid status values and their names. If your site uses |
|
|
| 430 | # additional values, add them here. |
|
|
| 431 | $siteDefaults{status} = { |
|
|
| 432 | A => "Audit", |
|
|
| 433 | a => "Audit", |
|
|
| 434 | audit => "Audit", |
|
|
| 435 | D => "Drop", |
|
|
| 436 | d => "Drop", |
|
|
| 437 | drop => "Drop", |
|
|
| 438 | withdraw => "Drop", |
|
|
| 439 | C => "Enrolled", |
|
|
| 440 | c => "Enrolled", |
|
|
| 441 | current => "Enrolled", |
|
|
| 442 | enrolled => "Enrolled", |
|
|
| 443 | }; |
|
|
| 444 | |
|
|
| 445 | # Set the default timezone of courses on this server. To get a list of valid |
461 | # Set the default timezone of courses on this server. To get a list of valid |
| 446 | # timezones, run: |
462 | # timezones, run: |
| 447 | # |
463 | # |
| 448 | # perl -MDateTime::TimeZone -e 'print join "\n", DateTime::TimeZone::all_names' |
464 | # perl -MDateTime::TimeZone -e 'print join "\n", DateTime::TimeZone::all_names' |
| 449 | # |
465 | # |
| … | |
… | |
| 462 | # The contents of the templates directory are copied from this course |
478 | # The contents of the templates directory are copied from this course |
| 463 | # to the new course being created. |
479 | # to the new course being created. |
| 464 | $siteDefaults{default_templates_course} ="modelCourse"; |
480 | $siteDefaults{default_templates_course} ="modelCourse"; |
| 465 | |
481 | |
| 466 | ################################################################################ |
482 | ################################################################################ |
| 467 | # Frontend options |
483 | # Theme |
| 468 | ################################################################################ |
484 | ################################################################################ |
| 469 | |
485 | |
| 470 | %templates = ( |
486 | $defaultTheme = "math"; |
| 471 | system => "$webworkDirs{conf}/templates/ur.template", |
487 | $defaultThemeTemplate = "system"; |
| 472 | gateway => "$webworkDirs{conf}/templates/gw.template", |
488 | |
|
|
489 | ################################################################################ |
|
|
490 | # Authentication system |
|
|
491 | ################################################################################ |
|
|
492 | |
|
|
493 | # FIXME This mechanism is a little awkward and probably should be merged with |
|
|
494 | # the dblayout selection system somehow. |
|
|
495 | |
|
|
496 | # Select the authentication module to use for normal logins. |
|
|
497 | # |
|
|
498 | # If this value is a string, the given authentication module will be used |
|
|
499 | # regardless of the database layout. If it is a hash, the database layout name |
|
|
500 | # will be looked up in the hash and the resulting value will be used as the |
|
|
501 | # authentication module. The special hash key "*" is used if no entry for the |
|
|
502 | # current database layout is found. |
|
|
503 | # |
|
|
504 | $authen{user_module} = { |
|
|
505 | sql_moodle => "WeBWorK::Authen::Moodle", |
|
|
506 | "*" => "WeBWorK::Authen", |
|
|
507 | }; |
|
|
508 | |
|
|
509 | # Select the authentication module to use for proctor logins. |
|
|
510 | # |
|
|
511 | # A string or a hash is accepted, as above. |
|
|
512 | # |
|
|
513 | $authen{proctor_module} = "WeBWorK::Authen::Proctor"; |
|
|
514 | |
|
|
515 | ################################################################################ |
|
|
516 | # Authorization system |
|
|
517 | ################################################################################ |
|
|
518 | |
|
|
519 | # this section lets you define which groups of users can perform which actions. |
|
|
520 | |
|
|
521 | # this hash maps a numeric permission level to the name of a role. the number |
|
|
522 | # assigned to a role is significant -- roles with higher numbers are considered |
|
|
523 | # "more privileged", and are included when that role is listed for a privilege |
|
|
524 | # below. |
|
|
525 | # |
|
|
526 | %userRoles = ( |
|
|
527 | guest => -5, |
|
|
528 | student => 0, |
|
|
529 | proctor => 2, |
|
|
530 | ta => 5, |
|
|
531 | professor => 10, |
| 473 | ); |
532 | ); |
| 474 | |
533 | |
| 475 | ################################################################################ |
534 | # this hash maps operations to the roles that are allowed to perform those |
| 476 | # Authorization system |
535 | # operations. the role listed and any role with a higher permission level (in |
| 477 | ################################################################################ |
536 | # the %userRoles hash) will be allowed to perform the operation. If the role |
| 478 | |
537 | # is undefined, no users will be allowed to perform the operation. |
| 479 | # This lets you specify a minimum permission level needed to perform certain |
538 | # |
| 480 | # actions. For each pair in the hash below, in order to perform the action |
|
|
| 481 | # described by the key, the user must have a permission level greater than or |
|
|
| 482 | # equal to the value. |
|
|
| 483 | |
|
|
| 484 | my $guest = -1; |
|
|
| 485 | my $student = 0; |
|
|
| 486 | my $proctor = 2; |
|
|
| 487 | my $ta = 5; |
|
|
| 488 | my $professor = 10; |
|
|
| 489 | my $nobody = undef; |
|
|
| 490 | |
|
|
| 491 | %permissionLevels = ( |
539 | %permissionLevels = ( |
| 492 | login => $guest, |
540 | login => "guest", |
| 493 | report_bugs => $student, |
541 | report_bugs => "student", |
| 494 | submit_feedback => $student, |
542 | submit_feedback => "student", |
| 495 | change_password => $student, |
543 | change_password => "student", |
| 496 | change_email_address => $student, |
544 | change_email_address => "student", |
| 497 | |
545 | |
| 498 | proctor_quiz => $proctor, |
546 | proctor_quiz => "proctor", |
|
|
547 | view_proctored_tests => "ta", |
| 499 | |
548 | |
| 500 | view_multiple_sets => $ta, |
549 | view_multiple_sets => "ta", |
| 501 | view_unopened_sets => $ta, |
550 | view_unopened_sets => "ta", |
| 502 | view_unpublished_sets => $ta, |
551 | view_unpublished_sets => "ta", |
| 503 | view_answers => $ta, |
552 | view_answers => "ta", |
| 504 | |
553 | |
| 505 | become_student => $professor, |
554 | become_student => "professor", |
| 506 | access_instructor_tools => $ta, |
555 | access_instructor_tools => "ta", |
| 507 | score_sets => $professor, |
556 | score_sets => "professor", |
| 508 | send_mail => $professor, |
557 | send_mail => "professor", |
| 509 | receive_feedback => $ta, |
558 | receive_feedback => "ta", |
| 510 | |
559 | |
| 511 | create_and_delete_problem_sets => $professor, |
560 | create_and_delete_problem_sets => "professor", |
| 512 | assign_problem_sets => $professor, |
561 | assign_problem_sets => "professor", |
| 513 | modify_problem_sets => $professor, |
562 | modify_problem_sets => "professor", |
| 514 | modify_student_data => $professor, |
563 | modify_student_data => "professor", |
| 515 | modify_classlist_files => $professor, |
564 | modify_classlist_files => "professor", |
| 516 | modify_set_def_files => $professor, |
565 | modify_set_def_files => "professor", |
| 517 | modify_scoring_files => $professor, |
566 | modify_scoring_files => "professor", |
| 518 | modify_problem_template_files => $professor, |
567 | modify_problem_template_files => "professor", |
|
|
568 | manage_course_files => "professor", |
| 519 | |
569 | |
| 520 | create_and_delete_courses => $professor, |
570 | create_and_delete_courses => "professor", |
| 521 | fix_course_databases => $professor, |
571 | fix_course_databases => "professor", |
| 522 | |
572 | |
| 523 | ##### Behavior of the interactive problem processor ##### |
573 | ##### Behavior of the interactive problem processor ##### |
| 524 | |
574 | |
| 525 | show_correct_answers_before_answer_date => $ta, |
575 | show_correct_answers_before_answer_date => "ta", |
| 526 | show_solutions_before_answer_date => $ta, |
576 | show_solutions_before_answer_date => "ta", |
| 527 | avoid_recording_answers => $ta, |
577 | avoid_recording_answers => "ta", |
| 528 | # Below this level, old answers are never initially shown |
578 | # Below this level, old answers are never initially shown |
| 529 | can_show_old_answers_by_default => $student, |
579 | can_show_old_answers_by_default => "student", |
| 530 | # at this level, we look at showOldAnswers for default value |
580 | # at this level, we look at showOldAnswers for default value |
| 531 | # even after the due date |
581 | # even after the due date |
| 532 | can_always_use_show_old_answers_default => $professor, |
582 | can_always_use_show_old_answers_default => "professor", |
| 533 | check_answers_before_open_date => $ta, |
583 | check_answers_before_open_date => "ta", |
| 534 | check_answers_after_open_date_with_attempts => $ta, |
584 | check_answers_after_open_date_with_attempts => "ta", |
| 535 | check_answers_after_open_date_without_attempts => $guest, |
585 | check_answers_after_open_date_without_attempts => "guest", |
| 536 | check_answers_after_due_date => $guest, |
586 | check_answers_after_due_date => "guest", |
| 537 | check_answers_after_answer_date => $guest, |
587 | check_answers_after_answer_date => "guest", |
| 538 | record_answers_when_acting_as_student => $nobody, |
588 | record_answers_when_acting_as_student => undef, |
| 539 | # "record_answers_when_acting_as_student" takes precedence |
589 | # "record_answers_when_acting_as_student" takes precedence |
| 540 | # over the following for professors acting as students: |
590 | # over the following for professors acting as students: |
| 541 | record_answers_before_open_date => $nobody, |
591 | record_answers_before_open_date => undef, |
| 542 | record_answers_after_open_date_with_attempts => $student, |
592 | record_answers_after_open_date_with_attempts => "student", |
| 543 | record_answers_after_open_date_without_attempts => $nobody, |
593 | record_answers_after_open_date_without_attempts => undef, |
| 544 | record_answers_after_due_date => $nobody, |
594 | record_answers_after_due_date => undef, |
| 545 | record_answers_after_answer_date => $nobody, |
595 | record_answers_after_answer_date => undef, |
| 546 | dont_log_past_answers => $professor, |
596 | dont_log_past_answers => "professor", |
|
|
597 | # does the user get to see a dump of the problem? |
|
|
598 | view_problem_debugging_info => "ta", |
| 547 | |
599 | |
| 548 | ##### Behavior of the Hardcopy Processor ##### |
600 | ##### Behavior of the Hardcopy Processor ##### |
| 549 | |
601 | |
| 550 | download_hardcopy_multiuser => $ta, |
602 | download_hardcopy_multiuser => "ta", |
| 551 | download_hardcopy_multiset => $ta, |
603 | download_hardcopy_multiset => "ta", |
|
|
604 | download_hardcopy_format_pdf => "guest", |
| 552 | download_hardcopy_format_tex => $ta, |
605 | download_hardcopy_format_tex => "ta", |
|
|
606 | ); |
|
|
607 | |
|
|
608 | # This is the default permission level given to new students and students with |
|
|
609 | # invalid or missing permission levels. |
|
|
610 | $default_permission_level = $userRoles{student}; |
|
|
611 | |
|
|
612 | ################################################################################ |
|
|
613 | # Status system |
|
|
614 | ################################################################################ |
|
|
615 | |
|
|
616 | # This is the default status given to new students and students with invalid |
|
|
617 | # or missing statuses. |
|
|
618 | $default_status = "Enrolled"; |
|
|
619 | |
|
|
620 | # The first abbreviation in the abbreviations list is the canonical |
|
|
621 | # abbreviation, and will be used when setting the status value in a user record |
|
|
622 | # or an exported classlist file. |
|
|
623 | # |
|
|
624 | # Results are undefined if more than one status has the same abbreviation. |
|
|
625 | # |
|
|
626 | # The four behaviors that are controlled by status are: |
|
|
627 | # allow_course_access => is this user allowed to log in? |
|
|
628 | # include_in_assignment => is this user included when assigning as set to "all" users? |
|
|
629 | # include_in_stats => is this user included in statistical reports? |
|
|
630 | # include_in_email => is this user included in emails sent to the class? |
|
|
631 | # include_in_scoring => is this user included in score reports? |
|
|
632 | |
|
|
633 | %statuses = ( |
|
|
634 | Enrolled => { |
|
|
635 | abbrevs => [qw/ C c current enrolled /], |
|
|
636 | behaviors => [qw/ allow_course_access include_in_assignment include_in_stats |
|
|
637 | include_in_email include_in_scoring /], |
|
|
638 | }, |
|
|
639 | Audit => { |
|
|
640 | abbrevs => [qw/ A a audit /], |
|
|
641 | behaviors => [qw/ allow_course_access include_in_assignment include_in_stats |
|
|
642 | include_in_email /], |
|
|
643 | }, |
|
|
644 | Drop => { |
|
|
645 | abbrevs => [qw/ D d drop withdraw /], |
|
|
646 | behaviors => [qw/ /], |
|
|
647 | }, |
| 553 | ); |
648 | ); |
| 554 | |
649 | |
| 555 | ################################################################################ |
650 | ################################################################################ |
| 556 | # Session options |
651 | # Session options |
| 557 | ################################################################################ |
652 | ################################################################################ |
| 558 | |
653 | |
| 559 | # $sessionKeyTimeout defines seconds of inactivity before a key expires |
654 | # $sessionKeyTimeout defines seconds of inactivity before a key expires |
| 560 | $sessionKeyTimeout = 60*30; |
655 | $sessionKeyTimeout = 60*30; |
| 561 | |
656 | |
| 562 | # $sessionKeyLength defines the length (in characters) of the session key |
657 | # $sessionKeyLength defines the length (in characters) of the session key |
| 563 | $sessionKeyLength = 40; |
658 | $sessionKeyLength = 32; |
| 564 | |
659 | |
| 565 | # @sessionKeyChars lists the legal session key characters |
660 | # @sessionKeyChars lists the legal session key characters |
| 566 | @sessionKeyChars = ('A'..'Z', 'a'..'z', '0'..'9', '.', '^', '/', '!', '*'); |
661 | @sessionKeyChars = ('A'..'Z', 'a'..'z', '0'..'9'); |
| 567 | |
662 | |
| 568 | # Practice users are users who's names start with $practiceUser |
663 | # Practice users are users who's names start with $practiceUser |
| 569 | # (you can comment this out to remove practice user support) |
664 | # (you can comment this out to remove practice user support) |
| 570 | $practiceUserPrefix = "practice"; |
665 | $practiceUserPrefix = "practice"; |
| 571 | |
666 | |
| 572 | # There is a practice user who can be logged in multiple times. He's |
667 | # There is a practice user who can be logged in multiple times. He's |
| 573 | # commented out by default, though, so you don't hurt yourself. It is |
668 | # commented out by default, though, so you don't hurt yourself. It is |
| 574 | # kindof a backdoor to the practice user system, since he doesn't have a |
669 | # kindof a backdoor to the practice user system, since he doesn't have a |
| 575 | # password. Come to think of it, why do we even have this?! |
670 | # password. Come to think of it, why do we even have this?! |
| 576 | #$debugPracticeUser = "practice666"; |
671 | #$debugPracticeUser = "practice666"; |
|
|
672 | |
|
|
673 | # Option for gateway tests; $gatewayGracePeriod is the time in seconds |
|
|
674 | # after the official due date during which we'll still grade the test |
|
|
675 | $gatewayGracePeriod = 120; |
| 577 | |
676 | |
| 578 | ################################################################################ |
677 | ################################################################################ |
| 579 | # PG subsystem options |
678 | # PG subsystem options |
| 580 | ################################################################################ |
679 | ################################################################################ |
| 581 | |
680 | |
| … | |
… | |
| 649 | # |
748 | # |
| 650 | # In the last statement, "webworkWrite" should match the user below. |
749 | # In the last statement, "webworkWrite" should match the user below. |
| 651 | # FIXME: this database can become a table in the 'webwork' database |
750 | # FIXME: this database can become a table in the 'webwork' database |
| 652 | dvipng_depth_db => { |
751 | dvipng_depth_db => { |
| 653 | dbsource => 'dbi:mysql:DvipngDepths', |
752 | dbsource => 'dbi:mysql:DvipngDepths', |
| 654 | user => $dbLayouts{sql}->{password}->{params}->{usernameRW}, |
753 | user => $dbLayouts{sql_single}->{password}->{params}->{usernameRW}, |
| 655 | passwd => $dbLayouts{sql}->{password}->{params}->{passwordRW}, |
754 | passwd => $dbLayouts{sql_single}->{password}->{params}->{passwordRW}, |
| 656 | }, |
755 | }, |
| 657 | }; |
756 | }; |
| 658 | |
757 | |
| 659 | $pg{displayModeOptions}{jsMath} = { |
758 | $pg{displayModeOptions}{jsMath} = { |
| 660 | reportMissingFonts => 0, # set to 1 to allow the missing font message |
759 | reportMissingFonts => 0, # set to 1 to allow the missing font message |
| 661 | missingFontMessage => undef, # set to an HTML string to replace the missing font message |
760 | missingFontMessage => undef, # set to an HTML string to replace the missing font message |
| 662 | noImageFonts => 0, # set to 1 if you didn't install the jsMath image fonts |
761 | noImageFonts => 0, # set to 1 if you didn't install the jsMath image fonts |
|
|
762 | processDoubleClicks => 1, # set to 0 to disable double-click on math to get TeX source |
| 663 | }; |
763 | }; |
| 664 | |
764 | |
| 665 | ##### Directories used by PG |
765 | ##### Directories used by PG |
| 666 | |
766 | |
| 667 | # The root of the PG directory tree (from pg_root in Apache config). |
767 | # The root of the PG directory tree (from pg_root in Apache config). |
| 668 | $pg{directories}{root} = "$pg_dir"; |
768 | $pg{directories}{root} = "$pg_dir"; |
| 669 | $pg{directories}{lib} = "$pg{directories}{root}/lib"; |
769 | $pg{directories}{lib} = "$pg{directories}{root}/lib"; |
| 670 | $pg{directories}{macros} = "$pg{directories}{root}/macros"; |
770 | $pg{directories}{macros} = "$pg{directories}{root}/macros"; |
|
|
771 | $pg{directories}{applets} = "http://$domainName$webwork_htdocs_url/applets"; |
| 671 | |
772 | |
| 672 | # |
773 | # |
| 673 | # The macro file search path. Each directory in this list is seached |
774 | # The macro file search path. Each directory in this list is seached |
| 674 | # (in this order) by loadMacros() when it looks for a .pl file. |
775 | # (in this order) by loadMacros() when it looks for a .pl file. |
| 675 | # |
776 | # |
| … | |
… | |
| 677 | ".", # search the problem file's directory |
778 | ".", # search the problem file's directory |
| 678 | $courseDirs{macros}, |
779 | $courseDirs{macros}, |
| 679 | $pg{directories}{macros}, |
780 | $pg{directories}{macros}, |
| 680 | ]; |
781 | ]; |
| 681 | |
782 | |
|
|
783 | $pg{directories}{appletPath} = [ # paths to search for applets (requires full url) |
|
|
784 | $pg{directories}{applets}, |
|
|
785 | "http://$domainName$courseURLs{html}/applets", |
|
|
786 | ]; |
|
|
787 | |
| 682 | ##### "Special" PG environment variables. (Stuff that doesn't fit in anywhere else.) |
788 | ##### "Special" PG environment variables. (Stuff that doesn't fit in anywhere else.) |
| 683 | |
789 | |
| 684 | # Users for whom to print the file name of the PG file being processed. |
790 | # Users for whom to print the file name of the PG file being processed. |
| 685 | $pg{specialPGEnvironmentVars}{PRINT_FILE_NAMES_FOR} = [ "professor", ]; |
791 | $pg{specialPGEnvironmentVars}{PRINT_FILE_NAMES_FOR} = [ "professor", ]; |
| 686 | |
792 | |
| … | |
… | |
| 692 | $pg{specialPGEnvironmentVars}{CAPA_Graphics_URL} = "$courseURLs{html}/CAPA_Graphics/", |
798 | $pg{specialPGEnvironmentVars}{CAPA_Graphics_URL} = "$courseURLs{html}/CAPA_Graphics/", |
| 693 | |
799 | |
| 694 | # Size in pixels of dynamically-generated images, i.e. graphs. |
800 | # Size in pixels of dynamically-generated images, i.e. graphs. |
| 695 | $pg{specialPGEnvironmentVars}{onTheFlyImageSize} = 400, |
801 | $pg{specialPGEnvironmentVars}{onTheFlyImageSize} = 400, |
| 696 | |
802 | |
| 697 | # To activate Parser-based versions of num_cmp and fun_cmp, change this |
803 | # To disable the Parser-based versions of num_cmp and fun_cmp, and use the |
| 698 | # value to 0. |
804 | # original versions instead, set this value to 1. |
| 699 | $pg{specialPGEnvironmentVars}{useOldAnswerMacros} = 1; |
805 | $pg{specialPGEnvironmentVars}{useOldAnswerMacros} = 0; |
| 700 | |
806 | |
| 701 | # Strings to insert at the start and end of the body of a problem |
807 | # Strings to insert at the start and end of the body of a problem |
| 702 | # (at beginproblem() and ENDDOCUMENT) in various modes. More display modes |
808 | # (at beginproblem() and ENDDOCUMENT) in various modes. More display modes |
| 703 | # can be added if different behaviours are desired (e.g., HTML_dpng, |
809 | # can be added if different behaviours are desired (e.g., HTML_dpng, |
| 704 | # HTML_asciimath, etc.). These parts are not used in the Library browser. |
810 | # HTML_asciimath, etc.). These parts are not used in the Library browser. |
| … | |
… | |
| 744 | [qw(Select)], |
850 | [qw(Select)], |
| 745 | [qw(Units)], |
851 | [qw(Units)], |
| 746 | [qw(VectorField)], |
852 | [qw(VectorField)], |
| 747 | [qw(Parser Value)], |
853 | [qw(Parser Value)], |
| 748 | [qw(Parser::Legacy)], |
854 | [qw(Parser::Legacy)], |
| 749 | [qw(Apache::Log)], |
|
|
| 750 | ]; |
855 | ]; |
| 751 | |
856 | |
| 752 | ##### Answer evaluatior defaults |
857 | ##### Answer evaluatior defaults |
| 753 | |
858 | |
| 754 | $pg{ansEvalDefaults} = { |
859 | $pg{ansEvalDefaults} = { |